zeroc-ice 3.8.2 → 3.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/dist/IceRuby/Communicator.cpp +26 -9
- data/dist/IceRuby/Config.h +0 -12
- data/dist/IceRuby/Connection.cpp +18 -9
- data/dist/IceRuby/DefaultSliceLoader.h +1 -1
- data/dist/IceRuby/Endpoint.cpp +21 -8
- data/dist/IceRuby/Operation.cpp +7 -5
- data/dist/IceRuby/Properties.cpp +3 -4
- data/dist/IceRuby/Proxy.cpp +11 -19
- data/dist/IceRuby/RubySliceLoader.cpp +1 -1
- data/dist/IceRuby/RubySliceLoader.h +6 -0
- data/dist/IceRuby/Types.cpp +162 -138
- data/dist/IceRuby/Types.h +68 -28
- data/dist/IceRuby/Util.cpp +14 -78
- data/dist/IceRuby/Util.h +7 -17
- data/dist/ice/cpp/include/Ice/Communicator.h +31 -8
- data/dist/ice/cpp/include/Ice/Config.h +2 -2
- data/dist/ice/cpp/include/Ice/Connection.h +24 -8
- data/dist/ice/cpp/include/Ice/CtrlCHandler.h +1 -1
- data/dist/ice/cpp/include/Ice/Demangle.h +1 -1
- data/dist/ice/cpp/include/Ice/Endpoint.h +4 -4
- data/dist/ice/cpp/include/Ice/Initialize.h +4 -4
- data/dist/ice/cpp/include/Ice/InputStream.h +5 -5
- data/dist/ice/cpp/include/Ice/Instrumentation.h +13 -7
- data/dist/ice/cpp/include/Ice/LocalExceptions.h +5 -5
- data/dist/ice/cpp/include/Ice/Logger.h +7 -0
- data/dist/ice/cpp/include/Ice/LoggerUtil.h +1 -1
- data/dist/ice/cpp/include/Ice/Object.h +10 -8
- data/dist/ice/cpp/include/Ice/ObjectAdapter.h +1 -1
- data/dist/ice/cpp/include/Ice/OutgoingAsync.h +5 -2
- data/dist/ice/cpp/include/Ice/OutgoingResponse.h +2 -1
- data/dist/ice/cpp/include/Ice/OutputStream.h +7 -6
- data/dist/ice/cpp/include/Ice/PluginFactory.h +1 -1
- data/dist/ice/cpp/include/Ice/Properties.h +3 -3
- data/dist/ice/cpp/include/Ice/Proxy.h +192 -50
- data/dist/ice/cpp/include/Ice/SSL/ClientAuthenticationOptions.h +3 -3
- data/dist/ice/cpp/include/Ice/SSL/EndpointInfo.h +1 -1
- data/dist/ice/cpp/include/Ice/SSL/ServerAuthenticationOptions.h +5 -5
- data/dist/ice/cpp/include/Ice/ServantLocator.h +1 -1
- data/dist/ice/cpp/include/Ice/Service.h +2 -5
- data/dist/ice/cpp/include/Ice/SliceLoader.h +1 -1
- data/dist/ice/cpp/include/Ice/SlicedData.h +5 -3
- data/dist/ice/cpp/include/Ice/StreamHelpers.h +1 -1
- data/dist/ice/cpp/include/Ice/StreamableTraits.h +2 -2
- data/dist/ice/cpp/include/Ice/StringConverter.h +2 -3
- data/dist/ice/cpp/include/Ice/StringUtil.h +2 -7
- data/dist/ice/cpp/include/Ice/UUID.h +1 -0
- data/dist/ice/cpp/include/Ice/Value.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/BuiltinSequences.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/Context.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/EndpointTypes.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/Identity.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/Locator.h +50 -14
- data/dist/ice/cpp/include/generated/Ice/LocatorRegistry.h +38 -11
- data/dist/ice/cpp/include/generated/Ice/Metrics.h +94 -39
- data/dist/ice/cpp/include/generated/Ice/OperationMode.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/Process.h +34 -8
- data/dist/ice/cpp/include/generated/Ice/PropertiesAdmin.h +42 -11
- data/dist/ice/cpp/include/generated/Ice/PropertyDict.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/RemoteLogger.h +93 -40
- data/dist/ice/cpp/include/generated/Ice/ReplyStatus.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/Router.h +50 -14
- data/dist/ice/cpp/include/generated/Ice/SliceChecksumDict.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/Version.h +2 -2
- data/dist/ice/cpp/include/generated/IceDiscovery/Lookup.h +66 -14
- data/dist/ice/cpp/include/generated/IceLocatorDiscovery/Lookup.h +34 -8
- data/dist/ice/cpp/src/Ice/AddDefaultPluginFactories_all.cpp +1 -1
- data/dist/ice/cpp/src/Ice/Base64.cpp +47 -137
- data/dist/ice/cpp/src/Ice/Base64.h +2 -2
- data/dist/ice/cpp/src/Ice/BatchRequestQueue.cpp +28 -13
- data/dist/ice/cpp/src/Ice/BatchRequestQueue.h +5 -1
- data/dist/ice/cpp/src/Ice/Buffer.cpp +1 -1
- data/dist/ice/cpp/src/Ice/CollocatedRequestHandler.cpp +1 -1
- data/dist/ice/cpp/src/Ice/CollocatedRequestHandler.h +1 -1
- data/dist/ice/cpp/src/Ice/Communicator.cpp +4 -3
- data/dist/ice/cpp/src/Ice/CommunicatorFlushBatchAsync.cpp +8 -0
- data/dist/ice/cpp/src/Ice/ConnectRequestHandler.cpp +5 -15
- data/dist/ice/cpp/src/Ice/ConnectRequestHandler.h +1 -1
- data/dist/ice/cpp/src/Ice/ConnectionFactory.cpp +6 -8
- data/dist/ice/cpp/src/Ice/ConnectionFactory.h +0 -3
- data/dist/ice/cpp/src/Ice/ConnectionI.cpp +94 -99
- data/dist/ice/cpp/src/Ice/ConnectionI.h +11 -8
- data/dist/ice/cpp/src/Ice/ConsoleUtil.cpp +1 -1
- data/dist/ice/cpp/src/Ice/DefaultsAndOverrides.cpp +10 -14
- data/dist/ice/cpp/src/Ice/EndpointI.h +1 -1
- data/dist/ice/cpp/src/Ice/FileUtil.cpp +12 -12
- data/dist/ice/cpp/src/Ice/FixedRequestHandler.cpp +1 -1
- data/dist/ice/cpp/src/Ice/FixedRequestHandler.h +1 -1
- data/dist/ice/cpp/src/Ice/HttpParser.h +0 -2
- data/dist/ice/cpp/src/Ice/IdleTimeoutTransceiverDecorator.cpp +6 -3
- data/dist/ice/cpp/src/Ice/IncomingRequest.cpp +1 -3
- data/dist/ice/cpp/src/Ice/InputStream.cpp +23 -19
- data/dist/ice/cpp/src/Ice/Instance.cpp +73 -50
- data/dist/ice/cpp/src/Ice/Instance.h +1 -6
- data/dist/ice/cpp/src/Ice/LocalExceptions.cpp +1 -1
- data/dist/ice/cpp/src/Ice/LocatorInfo.cpp +2 -2
- data/dist/ice/cpp/src/Ice/LoggerAdminI.cpp +13 -18
- data/dist/ice/cpp/src/Ice/LoggerI.cpp +1 -1
- data/dist/ice/cpp/src/Ice/LoggerI.h +2 -2
- data/dist/ice/cpp/src/Ice/MetricsAdminI.h +6 -1
- data/dist/ice/cpp/src/Ice/MetricsObserverI.h +22 -18
- data/dist/ice/cpp/src/Ice/NativePropertiesAdmin.cpp +5 -2
- data/dist/ice/cpp/src/Ice/Network.cpp +168 -103
- data/dist/ice/cpp/src/Ice/Network.h +12 -7
- data/dist/ice/cpp/src/Ice/NetworkProxy.cpp +17 -6
- data/dist/ice/cpp/src/Ice/NetworkProxy.h +2 -1
- data/dist/ice/cpp/src/Ice/Object.cpp +1 -1
- data/dist/ice/cpp/src/Ice/ObjectAdapterI.cpp +56 -19
- data/dist/ice/cpp/src/Ice/OpaqueEndpointI.cpp +10 -10
- data/dist/ice/cpp/src/Ice/Options.cpp +7 -2
- data/dist/ice/cpp/src/Ice/OutgoingAsync.cpp +1 -1
- data/dist/ice/cpp/src/Ice/OutputStream.cpp +4 -4
- data/dist/ice/cpp/src/Ice/PluginManagerI.cpp +7 -1
- data/dist/ice/cpp/src/Ice/Properties.cpp +26 -16
- data/dist/ice/cpp/src/Ice/PropertyUtil.cpp +1 -1
- data/dist/ice/cpp/src/Ice/ProtocolInstance.cpp +0 -11
- data/dist/ice/cpp/src/Ice/ProtocolInstance.h +1 -2
- data/dist/ice/cpp/src/Ice/Proxy.cpp +9 -1
- data/dist/ice/cpp/src/Ice/ProxyAsync.cpp +110 -13
- data/dist/ice/cpp/src/Ice/Random.cpp +68 -7
- data/dist/ice/cpp/src/Ice/Random.h +6 -2
- data/dist/ice/cpp/src/Ice/Reference.cpp +22 -11
- data/dist/ice/cpp/src/Ice/Reference.h +3 -0
- data/dist/ice/cpp/src/Ice/ReferenceFactory.cpp +10 -0
- data/dist/ice/cpp/src/Ice/RequestHandler.h +3 -1
- data/dist/ice/cpp/src/Ice/RequestHandlerCache.cpp +1 -1
- data/dist/ice/cpp/src/Ice/RequestHandlerCache.h +1 -1
- data/dist/ice/cpp/src/Ice/ResourceConfig.h +3 -3
- data/dist/ice/cpp/src/Ice/RetryQueue.cpp +8 -12
- data/dist/ice/cpp/src/Ice/SHA1.cpp +11 -11
- data/dist/ice/cpp/src/Ice/SSL/DistinguishedName.cpp +0 -6
- data/dist/ice/cpp/src/Ice/SSL/DistinguishedName.h +0 -6
- data/dist/ice/cpp/src/Ice/SSL/OpenSSLEngine.cpp +15 -1
- data/dist/ice/cpp/src/Ice/SSL/OpenSSLTransceiverI.cpp +77 -27
- data/dist/ice/cpp/src/Ice/SSL/OpenSSLTransceiverI.h +2 -1
- data/dist/ice/cpp/src/Ice/SSL/RFC2253.cpp +2 -2
- data/dist/ice/cpp/src/Ice/SSL/SSLUtil.cpp +39 -34
- data/dist/ice/cpp/src/Ice/SSL/SchannelEngine.cpp +130 -52
- data/dist/ice/cpp/src/Ice/SSL/SchannelTransceiverI.cpp +64 -33
- data/dist/ice/cpp/src/Ice/SSL/SchannelTransceiverI.h +0 -1
- data/dist/ice/cpp/src/Ice/SSL/SecureTransportEngine.cpp +3 -3
- data/dist/ice/cpp/src/Ice/SSL/SecureTransportTransceiverI.cpp +9 -3
- data/dist/ice/cpp/src/Ice/SSL/SecureTransportUtil.cpp +73 -51
- data/dist/ice/cpp/src/Ice/SSL/SecureTransportUtil.h +0 -8
- data/dist/ice/cpp/src/Ice/Selector.cpp +13 -11
- data/dist/ice/cpp/src/Ice/ServantManager.cpp +3 -3
- data/dist/ice/cpp/src/Ice/Service.cpp +33 -115
- data/dist/ice/cpp/src/Ice/StreamSocket.cpp +33 -40
- data/dist/ice/cpp/src/Ice/StreamSocket.h +4 -4
- data/dist/ice/cpp/src/Ice/StringConverter.cpp +1 -1
- data/dist/ice/cpp/src/Ice/StringUtil.cpp +12 -21
- data/dist/ice/cpp/src/Ice/SysLoggerI.cpp +136 -100
- data/dist/ice/cpp/src/Ice/SysLoggerI.h +7 -3
- data/dist/ice/cpp/src/Ice/SystemdJournalI.cpp +1 -1
- data/dist/ice/cpp/src/Ice/TcpAcceptor.cpp +7 -7
- data/dist/ice/cpp/src/Ice/TcpAcceptor.h +2 -1
- data/dist/ice/cpp/src/Ice/TcpBufSize.h +40 -0
- data/dist/ice/cpp/src/Ice/TcpConnector.cpp +5 -2
- data/dist/ice/cpp/src/Ice/TcpConnector.h +2 -0
- data/dist/ice/cpp/src/Ice/TcpTransceiver.cpp +6 -2
- data/dist/ice/cpp/src/Ice/ThreadPool.cpp +2 -8
- data/dist/ice/cpp/src/Ice/ThreadPool.h +0 -2
- data/dist/ice/cpp/src/Ice/Timer.cpp +7 -3
- data/dist/ice/cpp/src/Ice/UUID.cpp +1 -2
- data/dist/ice/cpp/src/Ice/UdpEndpointI.cpp +4 -1
- data/dist/ice/cpp/src/Ice/UdpTransceiver.cpp +136 -123
- data/dist/ice/cpp/src/Ice/UdpTransceiver.h +3 -4
- data/dist/ice/cpp/src/Ice/WSTransceiver.cpp +96 -27
- data/dist/ice/cpp/src/Ice/WSTransceiver.h +1 -1
- data/dist/ice/cpp/src/Ice/generated/BuiltinSequences.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/Context.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/EndpointTypes.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/Identity.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/Locator.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/LocatorRegistry.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/Metrics.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/OperationMode.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/Process.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/PropertiesAdmin.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/PropertyDict.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/RemoteLogger.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/ReplyStatus.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/Router.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/SliceChecksumDict.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/Version.cpp +2 -2
- data/dist/ice/cpp/src/IceDiscovery/LookupI.cpp +47 -9
- data/dist/ice/cpp/src/IceDiscovery/LookupI.h +8 -3
- data/dist/ice/cpp/src/IceDiscovery/generated/Lookup.cpp +2 -2
- data/dist/ice/cpp/src/IceLocatorDiscovery/PluginI.cpp +43 -14
- data/dist/ice/cpp/src/IceLocatorDiscovery/generated/Lookup.cpp +2 -2
- data/dist/ice/cpp/src/Slice/DocCommentParser.cpp +26 -20
- data/dist/ice/cpp/src/Slice/DocCommentParser.h +2 -2
- data/dist/ice/cpp/src/Slice/FileTracker.cpp +3 -11
- data/dist/ice/cpp/src/Slice/FileTracker.h +0 -2
- data/dist/ice/cpp/src/Slice/Grammar.cpp +211 -210
- data/dist/ice/cpp/src/Slice/MetadataValidation.cpp +10 -9
- data/dist/ice/cpp/src/Slice/Parser.cpp +28 -20
- data/dist/ice/cpp/src/Slice/Parser.h +3 -4
- data/dist/ice/cpp/src/Slice/Preprocessor.cpp +3 -11
- data/dist/ice/cpp/src/Slice/Preprocessor.h +0 -2
- data/dist/ice/cpp/src/Slice/Scanner.cpp +3 -3
- data/dist/ice/cpp/src/Slice/SliceUtil.cpp +197 -114
- data/dist/ice/cpp/src/Slice/StringLiteralUtil.cpp +0 -2
- data/dist/ice/cpp/src/Slice/Util.h +21 -9
- data/dist/ice/cpp/src/slice2rb/Ruby.cpp +7 -3
- data/dist/ice/cpp/src/slice2rb/RubyUtil.cpp +16 -12
- data/dist/ice/cpp/src/slice2rb/RubyUtil.h +3 -3
- data/dist/ice/slice/Glacier2/Router.ice +3 -3
- data/dist/ice/slice/Ice/Metrics.ice +6 -5
- data/dist/ice/slice/Ice/RemoteLogger.ice +5 -5
- data/dist/ice/slice/IceGrid/Admin.ice +9 -9
- data/dist/ice/slice/IceGrid/Descriptor.ice +5 -5
- data/dist/ice/slice/IceStorm/Metrics.ice +1 -1
- data/dist/lib/Glacier2/Metrics.rb +1 -1
- data/dist/lib/Glacier2/PermissionsVerifier.rb +1 -1
- data/dist/lib/Glacier2/Router.rb +2 -2
- data/dist/lib/Glacier2/SSLInfo.rb +1 -1
- data/dist/lib/Glacier2/Session.rb +1 -1
- data/dist/lib/Ice/BuiltinSequences.rb +1 -1
- data/dist/lib/Ice/CompressBatch.rb +1 -2
- data/dist/lib/Ice/Context.rb +1 -1
- data/dist/lib/Ice/EndpointSelectionType.rb +1 -2
- data/dist/lib/Ice/EndpointTypes.rb +1 -1
- data/dist/lib/Ice/Identity.rb +1 -1
- data/dist/lib/Ice/IdentitySpaceship.rb +1 -0
- data/dist/lib/Ice/Locator.rb +1 -1
- data/dist/lib/Ice/LocatorRegistry.rb +1 -1
- data/dist/lib/Ice/Metrics.rb +1 -1
- data/dist/lib/Ice/OperationMode.rb +2 -3
- data/dist/lib/Ice/Process.rb +1 -1
- data/dist/lib/Ice/PropertiesAdmin.rb +1 -1
- data/dist/lib/Ice/PropertyDict.rb +1 -1
- data/dist/lib/Ice/RemoteLogger.rb +2 -3
- data/dist/lib/Ice/ReplyStatus.rb +2 -3
- data/dist/lib/Ice/Router.rb +1 -1
- data/dist/lib/Ice/SliceChecksumDict.rb +1 -1
- data/dist/lib/Ice/SliceUtil.rb +2 -2
- data/dist/lib/Ice/Struct.rb +1 -0
- data/dist/lib/Ice/ToStringMode.rb +1 -2
- data/dist/lib/Ice/Value.rb +2 -2
- data/dist/lib/Ice/Version.rb +1 -1
- data/dist/lib/IceBox/ServiceManager.rb +1 -1
- data/dist/lib/IceGrid/Admin.rb +3 -4
- data/dist/lib/IceGrid/Descriptor.rb +1 -1
- data/dist/lib/IceGrid/Exception.rb +1 -1
- data/dist/lib/IceGrid/FileParser.rb +1 -1
- data/dist/lib/IceGrid/Registry.rb +2 -3
- data/dist/lib/IceGrid/Session.rb +2 -2
- data/dist/lib/IceGrid/UserAccountMapper.rb +1 -1
- data/dist/lib/IceStorm/IceStorm.rb +1 -1
- data/dist/lib/IceStorm/Metrics.rb +1 -1
- data/extconf.rb +1 -1
- data/ice.gemspec +3 -3
- metadata +4 -5
- data/dist/ice/cpp/src/Ice/DLLMain.cpp +0 -40
- data/dist/ice/cpp/src/Ice/UndefSysMacros.h +0 -37
|
@@ -22,7 +22,7 @@ namespace IceDiscovery
|
|
|
22
22
|
|
|
23
23
|
virtual bool retry();
|
|
24
24
|
void invoke(const std::string&, const std::vector<std::pair<LookupPrx, LookupReplyPrx>>&);
|
|
25
|
-
bool exception();
|
|
25
|
+
bool exception(size_t generation);
|
|
26
26
|
[[nodiscard]] std::string getRequestId() const;
|
|
27
27
|
|
|
28
28
|
virtual void finished(const std::optional<Ice::ObjectPrx>&) = 0;
|
|
@@ -35,6 +35,11 @@ namespace IceDiscovery
|
|
|
35
35
|
int _retryCount;
|
|
36
36
|
size_t _lookupCount{0};
|
|
37
37
|
size_t _failureCount{0};
|
|
38
|
+
|
|
39
|
+
// Incremented on each invoke() (i.e. each retry round). The exception callbacks capture the value current when
|
|
40
|
+
// they were sent, so a delayed failure from an earlier round can be ignored instead of counting against the
|
|
41
|
+
// current round.
|
|
42
|
+
size_t _generation{0};
|
|
38
43
|
};
|
|
39
44
|
using RequestPtr = std::shared_ptr<Request>;
|
|
40
45
|
|
|
@@ -128,9 +133,9 @@ namespace IceDiscovery
|
|
|
128
133
|
void foundAdapter(const std::string&, const std::string&, const Ice::ObjectPrx&, bool);
|
|
129
134
|
|
|
130
135
|
void adapterRequestTimedOut(const AdapterRequestPtr&);
|
|
131
|
-
void adapterRequestException(const AdapterRequestPtr&, std::exception_ptr);
|
|
136
|
+
void adapterRequestException(const AdapterRequestPtr&, std::exception_ptr, size_t generation);
|
|
132
137
|
void objectRequestTimedOut(const ObjectRequestPtr&);
|
|
133
|
-
void objectRequestException(const ObjectRequestPtr&, std::exception_ptr);
|
|
138
|
+
void objectRequestException(const ObjectRequestPtr&, std::exception_ptr, size_t generation);
|
|
134
139
|
|
|
135
140
|
const IceInternal::TimerPtr& timer() { return _timer; }
|
|
136
141
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Copyright (c) ZeroC, Inc.
|
|
2
2
|
|
|
3
|
-
// slice2cpp version 3.8.
|
|
3
|
+
// slice2cpp version 3.8.3
|
|
4
4
|
// <auto-generated>Generated from Slice file 'Lookup.ice'.</auto-generated>
|
|
5
5
|
|
|
6
6
|
#define ICE_BUILDING_GENERATED_CODE
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
# if ICE_INT_VERSION % 100 >= 50
|
|
31
31
|
# error Beta header file detected
|
|
32
32
|
# endif
|
|
33
|
-
# if ICE_INT_VERSION % 100 <
|
|
33
|
+
# if ICE_INT_VERSION % 100 < 3
|
|
34
34
|
# error Ice patch level mismatch!
|
|
35
35
|
# endif
|
|
36
36
|
#endif
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
#include "../Ice/Network.h" // For getInterfacesForMulticast
|
|
4
4
|
#include "../Ice/Timer.h"
|
|
5
|
+
#include "Ice/LocalExceptions.h"
|
|
5
6
|
#include "Ice/LoggerUtil.h"
|
|
6
7
|
#include "IceLocatorDiscovery/IceLocatorDiscovery.h"
|
|
7
8
|
#include "IceLocatorDiscovery/Lookup.h"
|
|
@@ -76,16 +77,16 @@ namespace
|
|
|
76
77
|
|
|
77
78
|
vector<Ice::LocatorPrx> getLocators(const string&, const chrono::milliseconds&);
|
|
78
79
|
|
|
79
|
-
void exception(std::exception_ptr);
|
|
80
|
+
void exception(std::exception_ptr, size_t generation);
|
|
80
81
|
|
|
81
82
|
private:
|
|
82
83
|
void runTimerTask() final;
|
|
83
84
|
|
|
84
85
|
LookupPrx _lookup;
|
|
85
86
|
vector<pair<LookupPrx, LookupReplyPrx>> _lookups;
|
|
86
|
-
chrono::milliseconds _timeout;
|
|
87
|
-
int _retryCount;
|
|
88
|
-
chrono::milliseconds _retryDelay;
|
|
87
|
+
const chrono::milliseconds _timeout;
|
|
88
|
+
const int _retryCount;
|
|
89
|
+
const chrono::milliseconds _retryDelay;
|
|
89
90
|
const IceInternal::TimerPtr _timer;
|
|
90
91
|
const int _traceLevel;
|
|
91
92
|
|
|
@@ -99,6 +100,10 @@ namespace
|
|
|
99
100
|
bool _pending{false};
|
|
100
101
|
int _pendingRetryCount{0};
|
|
101
102
|
size_t _failureCount{0};
|
|
103
|
+
// Incremented at the start of each lookup round. The findLocatorAsync exception callbacks capture the value
|
|
104
|
+
// current when they were sent, so a delayed failure from an earlier round is ignored instead of counting
|
|
105
|
+
// against the current round.
|
|
106
|
+
size_t _generation{0};
|
|
102
107
|
bool _warnOnce{true};
|
|
103
108
|
vector<RequestPtr> _pendingRequests;
|
|
104
109
|
std::mutex _mutex;
|
|
@@ -316,7 +321,7 @@ Request::invoke(const Ice::LocatorPrx& l)
|
|
|
316
321
|
}
|
|
317
322
|
else
|
|
318
323
|
{
|
|
319
|
-
outPair.first =
|
|
324
|
+
outPair.first = outParams.data();
|
|
320
325
|
outPair.second = outPair.first + outParams.size();
|
|
321
326
|
}
|
|
322
327
|
self->response(ok, outPair);
|
|
@@ -377,6 +382,11 @@ Request::exception(std::exception_ptr ex)
|
|
|
377
382
|
catch (...)
|
|
378
383
|
{
|
|
379
384
|
_exception = ex;
|
|
385
|
+
// This catch-all is reached only from the asynchronous ice_invokeAsync completion (which runs off
|
|
386
|
+
// LocatorI::_mutex), never synchronously from Request::invoke: the local exceptions ice_invokeAsync can throw
|
|
387
|
+
// synchronously (caught by Request::invoke's own catch clause and passed to exception() in-line) are all
|
|
388
|
+
// handled by the specific catch clauses above. That matters because the retry below re-enters
|
|
389
|
+
// LocatorI::invoke and re-locks the non-recursive LocatorI::_mutex.
|
|
380
390
|
_locator->invoke(_locatorPrx, shared_from_this()); // Retry with new locator proxy
|
|
381
391
|
}
|
|
382
392
|
}
|
|
@@ -396,17 +406,26 @@ LocatorI::LocatorI(
|
|
|
396
406
|
_locator(lookup->ice_getCommunicator()->getDefaultLocator()),
|
|
397
407
|
_voidLocator(std::move(voidLocator))
|
|
398
408
|
{
|
|
399
|
-
if (_timeout
|
|
409
|
+
if (_timeout <= chrono::milliseconds::zero())
|
|
400
410
|
{
|
|
401
|
-
|
|
411
|
+
throw Ice::PropertyException{
|
|
412
|
+
__FILE__,
|
|
413
|
+
__LINE__,
|
|
414
|
+
"property 'IceLocatorDiscovery.Timeout' must be greater than 0"};
|
|
402
415
|
}
|
|
403
416
|
if (_retryCount < 0)
|
|
404
417
|
{
|
|
405
|
-
|
|
418
|
+
throw Ice::PropertyException{
|
|
419
|
+
__FILE__,
|
|
420
|
+
__LINE__,
|
|
421
|
+
"property 'IceLocatorDiscovery.RetryCount' must be greater than or equal to 0"};
|
|
406
422
|
}
|
|
407
423
|
if (_retryDelay < chrono::milliseconds::zero())
|
|
408
424
|
{
|
|
409
|
-
|
|
425
|
+
throw Ice::PropertyException{
|
|
426
|
+
__FILE__,
|
|
427
|
+
__LINE__,
|
|
428
|
+
"property 'IceLocatorDiscovery.RetryDelay' must be greater than or equal to 0"};
|
|
410
429
|
}
|
|
411
430
|
}
|
|
412
431
|
|
|
@@ -533,8 +552,8 @@ LocatorI::foundLocator(const Ice::LocatorPrx& locator)
|
|
|
533
552
|
out << "received Ice locator with different instance name:\n";
|
|
534
553
|
out << "using = '" << _locator->ice_getIdentity().category << "'\n";
|
|
535
554
|
out << "received = '" << locator->ice_getIdentity().category << "'\n";
|
|
536
|
-
out << "This is typically the case if multiple Ice locators with different";
|
|
537
|
-
out << "instance names are deployed and the property
|
|
555
|
+
out << "This is typically the case if multiple Ice locators with different ";
|
|
556
|
+
out << "instance names are deployed and the property 'IceLocatorDiscovery.InstanceName' ";
|
|
538
557
|
out << "is not set.";
|
|
539
558
|
}
|
|
540
559
|
return;
|
|
@@ -624,6 +643,7 @@ LocatorI::invoke(const optional<Ice::LocatorPrx>& locator, const RequestPtr& req
|
|
|
624
643
|
{
|
|
625
644
|
_pending = true;
|
|
626
645
|
_failureCount = 0;
|
|
646
|
+
++_generation;
|
|
627
647
|
_pendingRetryCount = _retryCount;
|
|
628
648
|
try
|
|
629
649
|
{
|
|
@@ -642,7 +662,8 @@ LocatorI::invoke(const optional<Ice::LocatorPrx>& locator, const RequestPtr& req
|
|
|
642
662
|
_instanceName,
|
|
643
663
|
l.second,
|
|
644
664
|
nullptr,
|
|
645
|
-
[self = shared_from_this()](exception_ptr ex)
|
|
665
|
+
[self = shared_from_this(), generation = _generation](exception_ptr ex)
|
|
666
|
+
{ self->exception(ex, generation); });
|
|
646
667
|
}
|
|
647
668
|
_timer->schedule(shared_from_this(), _timeout);
|
|
648
669
|
}
|
|
@@ -672,9 +693,15 @@ LocatorI::invoke(const optional<Ice::LocatorPrx>& locator, const RequestPtr& req
|
|
|
672
693
|
}
|
|
673
694
|
|
|
674
695
|
void
|
|
675
|
-
LocatorI::exception(std::exception_ptr ex)
|
|
696
|
+
LocatorI::exception(std::exception_ptr ex, size_t generation)
|
|
676
697
|
{
|
|
677
698
|
lock_guard lock(_mutex);
|
|
699
|
+
// Ignore a delayed failure from an earlier lookup round: it must not count against the current round, which reset
|
|
700
|
+
// _failureCount and may still have outstanding lookups.
|
|
701
|
+
if (generation != _generation)
|
|
702
|
+
{
|
|
703
|
+
return;
|
|
704
|
+
}
|
|
678
705
|
if (++_failureCount == _lookups.size() && _pending)
|
|
679
706
|
{
|
|
680
707
|
//
|
|
@@ -757,13 +784,15 @@ LocatorI::runTimerTask()
|
|
|
757
784
|
}
|
|
758
785
|
}
|
|
759
786
|
_failureCount = 0;
|
|
787
|
+
++_generation;
|
|
760
788
|
for (const auto& l : _lookups)
|
|
761
789
|
{
|
|
762
790
|
l.first->findLocatorAsync(
|
|
763
791
|
_instanceName,
|
|
764
792
|
l.second,
|
|
765
793
|
nullptr,
|
|
766
|
-
[self = shared_from_this()](exception_ptr ex)
|
|
794
|
+
[self = shared_from_this(), generation = _generation](exception_ptr ex)
|
|
795
|
+
{ self->exception(ex, generation); });
|
|
767
796
|
}
|
|
768
797
|
_timer->schedule(shared_from_this(), _timeout);
|
|
769
798
|
return;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Copyright (c) ZeroC, Inc.
|
|
2
2
|
|
|
3
|
-
// slice2cpp version 3.8.
|
|
3
|
+
// slice2cpp version 3.8.3
|
|
4
4
|
// <auto-generated>Generated from Slice file 'Lookup.ice'.</auto-generated>
|
|
5
5
|
|
|
6
6
|
#define ICE_BUILDING_GENERATED_CODE
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
# if ICE_INT_VERSION % 100 >= 50
|
|
31
31
|
# error Beta header file detected
|
|
32
32
|
# endif
|
|
33
|
-
# if ICE_INT_VERSION % 100 <
|
|
33
|
+
# if ICE_INT_VERSION % 100 < 3
|
|
34
34
|
# error Ice patch level mismatch!
|
|
35
35
|
# endif
|
|
36
36
|
#endif
|
|
@@ -210,25 +210,19 @@ namespace
|
|
|
210
210
|
{
|
|
211
211
|
// Then we perform additional parsing to extract the name...
|
|
212
212
|
|
|
213
|
-
auto nameStart =
|
|
213
|
+
auto nameStart = doc.find_first_not_of(ws);
|
|
214
214
|
if (nameStart == string::npos)
|
|
215
215
|
{
|
|
216
|
-
return false; // Malformed line,
|
|
216
|
+
return false; // Malformed line, missing the name part after the tag. Ignore this line.
|
|
217
217
|
}
|
|
218
218
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
return false; // Malformed line, ignore it.
|
|
223
|
-
}
|
|
224
|
-
name = line.substr(nameStart, nameEnd - nameStart);
|
|
219
|
+
// If there's no whitespace after the name, that means the name runs to the end of the line.
|
|
220
|
+
auto nameEnd = doc.find_first_of(ws, nameStart);
|
|
221
|
+
name = (nameEnd == string::npos) ? doc.substr(nameStart) : doc.substr(nameStart, nameEnd - nameStart);
|
|
225
222
|
|
|
226
|
-
//
|
|
227
|
-
auto
|
|
228
|
-
|
|
229
|
-
{
|
|
230
|
-
doc = line.substr(docSplitPos);
|
|
231
|
-
}
|
|
223
|
+
// If there's any non-whitespace characters after the name, store them in the `doc` string.
|
|
224
|
+
auto docStart = doc.find_first_not_of(ws, nameEnd);
|
|
225
|
+
doc = (docStart == string::npos) ? "" : doc.substr(docStart);
|
|
232
226
|
|
|
233
227
|
return true;
|
|
234
228
|
}
|
|
@@ -291,12 +285,12 @@ namespace
|
|
|
291
285
|
openingEnd = (openingEnd == string::npos ? line.size() : openingEnd);
|
|
292
286
|
auto count = openingEnd - pos;
|
|
293
287
|
|
|
294
|
-
// Find the closing
|
|
288
|
+
// Find the closing delimiter, starting for the end of the opening delimiter.
|
|
295
289
|
auto delimiter = string(count, '`');
|
|
296
290
|
auto closingStart = line.find(delimiter, openingEnd);
|
|
297
291
|
if (closingStart == string::npos)
|
|
298
292
|
{
|
|
299
|
-
// No matching
|
|
293
|
+
// No matching delimiter was found. Emit a warning, then skip to the next line. This one is broken.
|
|
300
294
|
const string msg = "unterminated code span: missing closing backtick delimiter";
|
|
301
295
|
p->unit()->warning(p->file(), p->line(), InvalidComment, msg);
|
|
302
296
|
|
|
@@ -325,12 +319,24 @@ namespace
|
|
|
325
319
|
const string linkTag = "{@link ";
|
|
326
320
|
|
|
327
321
|
auto endpos = line.find('}', pos);
|
|
328
|
-
if (endpos
|
|
322
|
+
if (endpos == string::npos)
|
|
323
|
+
{
|
|
324
|
+
// No closing brace was found. Emit a warning, then skip to the next line. This one is broken.
|
|
325
|
+
const string msg = "unterminated link tag: missing closing '}'";
|
|
326
|
+
p->unit()->warning(p->file(), p->line(), InvalidComment, msg);
|
|
327
|
+
|
|
328
|
+
pos = line.size();
|
|
329
|
+
}
|
|
330
|
+
else
|
|
329
331
|
{
|
|
330
|
-
// Extract the linked-to identifier.
|
|
332
|
+
// Extract the linked-to identifier, trimming any whitespace around it.
|
|
333
|
+
string linkText;
|
|
331
334
|
auto identStart = line.find_first_not_of(" \t", pos + linkTag.size());
|
|
332
|
-
|
|
333
|
-
|
|
335
|
+
if (identStart < endpos)
|
|
336
|
+
{
|
|
337
|
+
auto identEnd = line.find_last_not_of(" \t", endpos - 1);
|
|
338
|
+
linkText = line.substr(identStart, identEnd - identStart + 1);
|
|
339
|
+
}
|
|
334
340
|
|
|
335
341
|
// Then erase the entire '{@link foo}' tag from the comment.
|
|
336
342
|
line.erase(pos, endpos - pos + 1);
|
|
@@ -30,7 +30,7 @@ namespace Slice
|
|
|
30
30
|
/// @param paramName If @p paramPtr is non-null, this is the mapped name of the parameter being referenced.
|
|
31
31
|
/// Otherwise, this is the identifier after '@p', taken verbatim from the doc-comment.
|
|
32
32
|
/// @param paramPtr A pointer to the parameter that is being referenced, or `nullptr` if it doesn't exist.
|
|
33
|
-
/// @return A properly formatted
|
|
33
|
+
/// @return A properly formatted parameter reference in the target language. The doc-comment parser will
|
|
34
34
|
/// replace the entire "@p <rawParamName>" string with the returned value.
|
|
35
35
|
//
|
|
36
36
|
// By default we just emit the parameter's name in code formatting.
|
|
@@ -48,7 +48,7 @@ namespace Slice
|
|
|
48
48
|
|
|
49
49
|
/// This function is called by the doc-comment parser to map see-also references ('@see <rawLink>') into each
|
|
50
50
|
/// language's syntax.
|
|
51
|
-
/// @param rawLink The
|
|
51
|
+
/// @param rawLink The reference's raw text, taken verbatim from the doc-comment.
|
|
52
52
|
/// @param source A pointer to the Slice element that the doc-comment (and reference) are written on.
|
|
53
53
|
/// @param target A pointer to the Slice element that is being referenced, or `nullptr` if it doesn't exist.
|
|
54
54
|
/// @return A properly formatted see-also-link in the target language. This value will be stored in the
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
#include "FileTracker.h"
|
|
4
4
|
#include "../Ice/ConsoleUtil.h"
|
|
5
5
|
#include "../Ice/FileUtil.h"
|
|
6
|
+
#include "Util.h"
|
|
6
7
|
|
|
7
8
|
#include <cassert>
|
|
8
9
|
|
|
@@ -29,20 +30,11 @@ Slice::FileTracker::instance()
|
|
|
29
30
|
void
|
|
30
31
|
Slice::FileTracker::setSource(const string& source)
|
|
31
32
|
{
|
|
32
|
-
_source = source;
|
|
33
33
|
pair<map<string, list<string>>::iterator, bool> p = _generated.insert(make_pair(source, list<string>()));
|
|
34
34
|
assert(p.second);
|
|
35
35
|
_curr = p.first;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
void
|
|
39
|
-
Slice::FileTracker::error()
|
|
40
|
-
{
|
|
41
|
-
assert(_curr != _generated.end());
|
|
42
|
-
_generated.erase(_curr);
|
|
43
|
-
_curr = _generated.end();
|
|
44
|
-
}
|
|
45
|
-
|
|
46
38
|
void
|
|
47
39
|
Slice::FileTracker::addFile(const string& file)
|
|
48
40
|
{
|
|
@@ -84,10 +76,10 @@ Slice::FileTracker::dumpxml()
|
|
|
84
76
|
{
|
|
85
77
|
if (!p.second.empty())
|
|
86
78
|
{
|
|
87
|
-
consoleOut << endl << " <source name=\"" << p.first << "\">";
|
|
79
|
+
consoleOut << endl << " <source name=\"" << escapeXMLAttribute(p.first) << "\">";
|
|
88
80
|
for (const auto& q : p.second)
|
|
89
81
|
{
|
|
90
|
-
consoleOut << endl << " <file name=\"" << q << "\"/>";
|
|
82
|
+
consoleOut << endl << " <file name=\"" << escapeXMLAttribute(q) << "\"/>";
|
|
91
83
|
}
|
|
92
84
|
consoleOut << endl << " </source>";
|
|
93
85
|
}
|
|
@@ -30,13 +30,11 @@ namespace Slice
|
|
|
30
30
|
void setSource(const std::string& source);
|
|
31
31
|
void addFile(const std::string& file);
|
|
32
32
|
void addDirectory(const std::string& dir);
|
|
33
|
-
void error();
|
|
34
33
|
void cleanup();
|
|
35
34
|
void dumpxml();
|
|
36
35
|
|
|
37
36
|
private:
|
|
38
37
|
std::list<std::pair<std::string, bool>> _files;
|
|
39
|
-
std::string _source;
|
|
40
38
|
std::map<std::string, std::list<std::string>> _generated;
|
|
41
39
|
std::map<std::string, std::list<std::string>>::iterator _curr;
|
|
42
40
|
};
|