diff --git a/config/PropertyNames.xml b/config/PropertyNames.xml index 7782337aa50..31668dec7db 100644 --- a/config/PropertyNames.xml +++ b/config/PropertyNames.xml @@ -521,10 +521,7 @@ generated from the section label.
- - - @@ -540,10 +537,7 @@ generated from the section label. - - - diff --git a/cpp/msbuild/ice.test.sln b/cpp/msbuild/ice.test.sln index a59c6299c17..a69827b3b4b 100644 --- a/cpp/msbuild/ice.test.sln +++ b/cpp/msbuild/ice.test.sln @@ -553,18 +553,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "server", "..\test\Glacier2\ {C7223CC8-0AAA-470B-ACB3-12B9DE75525C} = {C7223CC8-0AAA-470B-ACB3-12B9DE75525C} EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "override", "override", "{5EE5BF6D-076E-490D-B31D-E01AD72EE103}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "client", "..\test\Glacier2\override\msbuild\client\client.vcxproj", "{3C394401-8E95-475B-8B35-B90A7CCAE578}" - ProjectSection(ProjectDependencies) = postProject - {C7223CC8-0AAA-470B-ACB3-12B9DE75525C} = {C7223CC8-0AAA-470B-ACB3-12B9DE75525C} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "server", "..\test\Glacier2\override\msbuild\server\server.vcxproj", "{E1510790-AF0B-4FFE-B6AA-B75119793AFC}" - ProjectSection(ProjectDependencies) = postProject - {C7223CC8-0AAA-470B-ACB3-12B9DE75525C} = {C7223CC8-0AAA-470B-ACB3-12B9DE75525C} - EndProjectSection -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "router", "router", "{416598FC-0620-4246-8012-6BB99446C2EF}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "client", "..\test\Glacier2\router\msbuild\client\client.vcxproj", "{7CB05069-58C9-4C7D-A6A6-DBFB1CE7C58C}" @@ -1875,22 +1863,6 @@ Global {814690FE-2C4F-4EF4-82CB-720BC4C8FF9B}.Release|Win32.Build.0 = Release|Win32 {814690FE-2C4F-4EF4-82CB-720BC4C8FF9B}.Release|x64.ActiveCfg = Release|x64 {814690FE-2C4F-4EF4-82CB-720BC4C8FF9B}.Release|x64.Build.0 = Release|x64 - {3C394401-8E95-475B-8B35-B90A7CCAE578}.Debug|Win32.ActiveCfg = Debug|Win32 - {3C394401-8E95-475B-8B35-B90A7CCAE578}.Debug|Win32.Build.0 = Debug|Win32 - {3C394401-8E95-475B-8B35-B90A7CCAE578}.Debug|x64.ActiveCfg = Debug|x64 - {3C394401-8E95-475B-8B35-B90A7CCAE578}.Debug|x64.Build.0 = Debug|x64 - {3C394401-8E95-475B-8B35-B90A7CCAE578}.Release|Win32.ActiveCfg = Release|Win32 - {3C394401-8E95-475B-8B35-B90A7CCAE578}.Release|Win32.Build.0 = Release|Win32 - {3C394401-8E95-475B-8B35-B90A7CCAE578}.Release|x64.ActiveCfg = Release|x64 - {3C394401-8E95-475B-8B35-B90A7CCAE578}.Release|x64.Build.0 = Release|x64 - {E1510790-AF0B-4FFE-B6AA-B75119793AFC}.Debug|Win32.ActiveCfg = Debug|Win32 - {E1510790-AF0B-4FFE-B6AA-B75119793AFC}.Debug|Win32.Build.0 = Debug|Win32 - {E1510790-AF0B-4FFE-B6AA-B75119793AFC}.Debug|x64.ActiveCfg = Debug|x64 - {E1510790-AF0B-4FFE-B6AA-B75119793AFC}.Debug|x64.Build.0 = Debug|x64 - {E1510790-AF0B-4FFE-B6AA-B75119793AFC}.Release|Win32.ActiveCfg = Release|Win32 - {E1510790-AF0B-4FFE-B6AA-B75119793AFC}.Release|Win32.Build.0 = Release|Win32 - {E1510790-AF0B-4FFE-B6AA-B75119793AFC}.Release|x64.ActiveCfg = Release|x64 - {E1510790-AF0B-4FFE-B6AA-B75119793AFC}.Release|x64.Build.0 = Release|x64 {7CB05069-58C9-4C7D-A6A6-DBFB1CE7C58C}.Debug|Win32.ActiveCfg = Debug|Win32 {7CB05069-58C9-4C7D-A6A6-DBFB1CE7C58C}.Debug|Win32.Build.0 = Debug|Win32 {7CB05069-58C9-4C7D-A6A6-DBFB1CE7C58C}.Debug|x64.ActiveCfg = Debug|x64 @@ -2829,9 +2801,6 @@ Global {5F5555CC-6370-44BE-9234-8B86F71245B8} = {4CE3B59A-59E3-4182-82BE-A92BD4FC9657} {14C78FC0-F80C-425F-A504-1DD264BCDD01} = {5F5555CC-6370-44BE-9234-8B86F71245B8} {814690FE-2C4F-4EF4-82CB-720BC4C8FF9B} = {5F5555CC-6370-44BE-9234-8B86F71245B8} - {5EE5BF6D-076E-490D-B31D-E01AD72EE103} = {4CE3B59A-59E3-4182-82BE-A92BD4FC9657} - {3C394401-8E95-475B-8B35-B90A7CCAE578} = {5EE5BF6D-076E-490D-B31D-E01AD72EE103} - {E1510790-AF0B-4FFE-B6AA-B75119793AFC} = {5EE5BF6D-076E-490D-B31D-E01AD72EE103} {416598FC-0620-4246-8012-6BB99446C2EF} = {4CE3B59A-59E3-4182-82BE-A92BD4FC9657} {7CB05069-58C9-4C7D-A6A6-DBFB1CE7C58C} = {416598FC-0620-4246-8012-6BB99446C2EF} {3BD0D95D-8DC6-4A07-B4D9-72EC85C4C97A} = {416598FC-0620-4246-8012-6BB99446C2EF} diff --git a/cpp/src/Glacier2/Blobject.cpp b/cpp/src/Glacier2/Blobject.cpp index b8391bd546f..3704f32c751 100644 --- a/cpp/src/Glacier2/Blobject.cpp +++ b/cpp/src/Glacier2/Blobject.cpp @@ -17,8 +17,6 @@ namespace constexpr string_view clientForwardContext = "Glacier2.Client.ForwardContext"; constexpr string_view serverTraceRequest = "Glacier2.Server.Trace.Request"; constexpr string_view clientTraceRequest = "Glacier2.Client.Trace.Request"; - constexpr string_view serverTraceOverride = "Glacier2.Server.Trace.Override"; - constexpr string_view clientTraceOverride = "Glacier2.Client.Trace.Override"; } Glacier2::Blobject::Blobject(shared_ptr instance, ConnectionPtr reverseConnection, const Context& context) @@ -30,35 +28,8 @@ Glacier2::Blobject::Blobject(shared_ptr instance, ConnectionPtr revers _requestTraceLevel( _reverseConnection ? _instance->properties()->getIcePropertyAsInt(serverTraceRequest) : _instance->properties()->getIcePropertyAsInt(clientTraceRequest)), - _overrideTraceLevel( - reverseConnection ? _instance->properties()->getIcePropertyAsInt(serverTraceOverride) - : _instance->properties()->getIcePropertyAsInt(clientTraceOverride)), _context(context) { - auto t = _reverseConnection ? _instance->serverRequestQueueThread() : _instance->clientRequestQueueThread(); - if (t) - { - const_cast&>(_requestQueue) = - make_shared(t, _instance, _reverseConnection); - } -} - -void -Glacier2::Blobject::destroy() -{ - if (_requestQueue) - { - _requestQueue->destroy(); - } -} - -void -Glacier2::Blobject::updateObserver(const shared_ptr& observer) -{ - if (_requestQueue) - { - _requestQueue->updateObserver(observer); - } } void @@ -163,14 +134,6 @@ Glacier2::Blobject::invoke( out << "reverse "; } out << "routing"; - if (_requestQueue) - { - out << " (buffered)"; - } - else - { - out << " (not buffered)"; - } if (_reverseConnection) { out << "\nidentity = " << _instance->communicator()->identityToString(proxy->ice_getIdentity()); @@ -192,131 +155,76 @@ Glacier2::Blobject::invoke( } } - if (_requestQueue) + try { - // - // If we are in buffered mode, we create a new request and add - // it to the request queue. If the request is twoway, we use - // AMI. - // + function)> amiResponse = nullptr; + function amiSent = nullptr; - bool override; - try + if (proxy->ice_isTwoway()) { - override = _requestQueue->addRequest( - make_shared< - Request>(proxy, inParams, current, _forwardContext, _context, std::move(response), exception)); + amiResponse = std::move(response); } - catch (const ObjectNotExistException&) + else { - exception(current_exception()); - return; + // For oneway requests, we want the dispatch to complete only once the request has been forwarded (sent). + // This ensures proper flow control / back pressure through the Glacier2 router. + amiSent = [amdResponse = std::move(response)](bool) { amdResponse(true, {nullptr, nullptr}); }; } - if (override && _overrideTraceLevel >= 1) + if (_forwardContext) { - Trace out(_instance->logger(), "Glacier2"); - if (_reverseConnection) - { - out << "reverse "; - } - out << "routing override"; - if (_reverseConnection) + if (_context.size() > 0) { - out << "\nidentity = " << _instance->communicator()->identityToString(proxy->ice_getIdentity()); + Context ctx = current.ctx; + ctx.insert(_context.begin(), _context.end()); + proxy->ice_invokeAsync( + current.operation, + current.mode, + inParams, + std::move(amiResponse), + exception, + std::move(amiSent), + ctx); } else { - out << "\nproxy = " << proxy; - } - out << "\noperation = " << current.operation; - out << "\ncontext = "; - Context::const_iterator q = current.ctx.begin(); - while (q != current.ctx.end()) - { - out << q->first << '/' << q->second; - if (++q != current.ctx.end()) - { - out << ", "; - } + proxy->ice_invokeAsync( + current.operation, + current.mode, + inParams, + std::move(amiResponse), + exception, + std::move(amiSent), + current.ctx); } } - } - else - { - // - // If we are in not in buffered mode, we send the request directly. - // - - try + else { - function)> amiResponse = nullptr; - function amiSent = nullptr; - - if (proxy->ice_isTwoway()) - { - amiResponse = std::move(response); - } - else - { - amiSent = [amdResponse = std::move(response)](bool) { amdResponse(true, {nullptr, nullptr}); }; - } - - if (_forwardContext) + if (_context.size() > 0) { - if (_context.size() > 0) - { - Context ctx = current.ctx; - ctx.insert(_context.begin(), _context.end()); - proxy->ice_invokeAsync( - current.operation, - current.mode, - inParams, - std::move(amiResponse), - std::move(exception), - std::move(amiSent), - ctx); - } - else - { - proxy->ice_invokeAsync( - current.operation, - current.mode, - inParams, - std::move(amiResponse), - std::move(exception), - std::move(amiSent), - current.ctx); - } + proxy->ice_invokeAsync( + current.operation, + current.mode, + inParams, + std::move(amiResponse), + exception, + std::move(amiSent), + _context); } else { - if (_context.size() > 0) - { - proxy->ice_invokeAsync( - current.operation, - current.mode, - inParams, - std::move(amiResponse), - std::move(exception), - std::move(amiSent), - _context); - } - else - { - proxy->ice_invokeAsync( - current.operation, - current.mode, - inParams, - std::move(amiResponse), - std::move(exception), - std::move(amiSent)); - } + proxy->ice_invokeAsync( + current.operation, + current.mode, + inParams, + std::move(amiResponse), + exception, + std::move(amiSent)); } } - catch (const LocalException&) - { - exception(current_exception()); - } + } + catch (const LocalException&) + { + exception(current_exception()); } } diff --git a/cpp/src/Glacier2/Blobject.h b/cpp/src/Glacier2/Blobject.h index a7d0cb2a45d..0913a7ff5d7 100644 --- a/cpp/src/Glacier2/Blobject.h +++ b/cpp/src/Glacier2/Blobject.h @@ -7,7 +7,6 @@ #include "Ice/Ice.h" #include "Instance.h" -#include "RequestQueue.h" namespace Glacier2 { @@ -15,11 +14,6 @@ namespace Glacier2 { public: Blobject(std::shared_ptr, Ice::ConnectionPtr, const Ice::Context&); - - void destroy(); - - virtual void updateObserver(const std::shared_ptr&); - void invokeException(std::exception_ptr, std::function&&); protected: @@ -36,8 +30,6 @@ namespace Glacier2 private: const bool _forwardContext; const int _requestTraceLevel; - const int _overrideTraceLevel; - const std::shared_ptr _requestQueue; const Ice::Context _context; }; } diff --git a/cpp/src/Glacier2/Instance.cpp b/cpp/src/Glacier2/Instance.cpp index 43f732a8249..2de422ddb25 100644 --- a/cpp/src/Glacier2/Instance.cpp +++ b/cpp/src/Glacier2/Instance.cpp @@ -10,14 +10,6 @@ using namespace std; using namespace Glacier2; -namespace -{ - constexpr string_view serverSleepTime = "Glacier2.Server.SleepTime"; - constexpr string_view clientSleepTime = "Glacier2.Client.SleepTime"; - constexpr string_view serverBuffered = "Glacier2.Server.Buffered"; - constexpr string_view clientBuffered = "Glacier2.Client.Buffered"; -} - Glacier2::Instance::Instance( shared_ptr communicator, Ice::ObjectAdapterPtr clientAdapter, @@ -29,20 +21,6 @@ Glacier2::Instance::Instance( _serverAdapter(std::move(serverAdapter)), _proxyVerifier(make_shared(_communicator)) { - if (_properties->getIcePropertyAsInt(serverBuffered) > 0) - { - auto sleepTime = chrono::milliseconds(_properties->getIcePropertyAsInt(serverSleepTime)); - const_cast&>(_serverRequestQueueThread) = - make_shared(sleepTime); - } - - if (_properties->getIcePropertyAsInt(clientBuffered) > 0) - { - auto sleepTime = chrono::milliseconds(_properties->getIcePropertyAsInt(clientSleepTime)); - const_cast&>(_clientRequestQueueThread) = - make_shared(sleepTime); - } - // // If an Ice metrics observer is setup on the communicator, also enable metrics for Glacier2. // @@ -57,16 +35,6 @@ Glacier2::Instance::Instance( void Glacier2::Instance::destroy() { - if (_clientRequestQueueThread) - { - _clientRequestQueueThread->destroy(); - } - - if (_serverRequestQueueThread) - { - _serverRequestQueueThread->destroy(); - } - _sessionRouter = nullptr; } diff --git a/cpp/src/Glacier2/Instance.h b/cpp/src/Glacier2/Instance.h index 67f922fbed7..84f58254ec4 100644 --- a/cpp/src/Glacier2/Instance.h +++ b/cpp/src/Glacier2/Instance.h @@ -11,7 +11,6 @@ #include "Instrumentation.h" #include "ProxyVerifier.h" -#include "RequestQueue.h" #include "SessionRouterI.h" namespace Glacier2 @@ -27,8 +26,6 @@ namespace Glacier2 Ice::PropertiesPtr properties() const { return _properties; } Ice::LoggerPtr logger() const { return _logger; } - std::shared_ptr clientRequestQueueThread() const { return _clientRequestQueueThread; } - std::shared_ptr serverRequestQueueThread() const { return _serverRequestQueueThread; } std::shared_ptr proxyVerifier() const { return _proxyVerifier; } std::shared_ptr sessionRouter() const { return _sessionRouter; } @@ -44,8 +41,6 @@ namespace Glacier2 const Ice::LoggerPtr _logger; const Ice::ObjectAdapterPtr _clientAdapter; const Ice::ObjectAdapterPtr _serverAdapter; - const std::shared_ptr _clientRequestQueueThread; - const std::shared_ptr _serverRequestQueueThread; const std::shared_ptr _proxyVerifier; std::shared_ptr _sessionRouter; const std::shared_ptr _observer; diff --git a/cpp/src/Glacier2/RequestQueue.cpp b/cpp/src/Glacier2/RequestQueue.cpp deleted file mode 100644 index 96c66fee174..00000000000 --- a/cpp/src/Glacier2/RequestQueue.cpp +++ /dev/null @@ -1,477 +0,0 @@ -// -// Copyright (c) ZeroC, Inc. All rights reserved. -// - -#include "RequestQueue.h" -#include "Instance.h" -#include "SessionRouterI.h" - -using namespace std; -using namespace Ice; -using namespace Glacier2; - -Glacier2::Request::Request( - ObjectPrx proxy, - pair inParams, - const Current& current, - bool forwardContext, - const Ice::Context& sslContext, - function)> response, - function exception) - : _proxy(std::move(proxy)), - _inParams(inParams.first, inParams.second), - _current(current), - _forwardContext(forwardContext), - _sslContext(sslContext), - _response(std::move(response)), - _exception(std::move(exception)) -{ - Context::const_iterator p = current.ctx.find("_ovrd"); - if (p != current.ctx.end()) - { - const_cast(_override) = p->second; - } -} - -void -Glacier2::Request::invoke( - function)>&& response, - function&& exception, - std::function&& sent) -{ - pair inPair; - if (_inParams.size() == 0) - { - inPair.first = inPair.second = nullptr; - } - else - { - inPair.first = _inParams.data(); - inPair.second = inPair.first + _inParams.size(); - } - - if (_forwardContext) - { - if (_sslContext.size() > 0) - { - Ice::Context ctx = _current.ctx; - ctx.insert(_sslContext.begin(), _sslContext.end()); - _proxy->ice_invokeAsync( - _current.operation, - _current.mode, - inPair, - std::move(response), - std::move(exception), - std::move(sent), - ctx); - } - else - { - _proxy->ice_invokeAsync( - _current.operation, - _current.mode, - inPair, - std::move(response), - std::move(exception), - std::move(sent), - _current.ctx); - } - } - else - { - if (_sslContext.size() > 0) - { - _proxy->ice_invokeAsync( - _current.operation, - _current.mode, - inPair, - std::move(response), - std::move(exception), - std::move(sent), - _sslContext); - } - else - { - _proxy->ice_invokeAsync( - _current.operation, - _current.mode, - inPair, - std::move(response), - std::move(exception), - std::move(sent)); - } - } -} - -bool -Glacier2::Request::override(const shared_ptr& other) const -{ - // - // Both override values have to be non-empty. - // - if (_override.empty() || other->_override.empty()) - { - return false; - } - - // - // Override does not work for twoways, because a response is - // expected for each request. - // - if (_proxy->ice_isTwoway() || other->_proxy->ice_isTwoway()) - { - return false; - } - - // - // Don't override if the override isn't the same. - // - if (_override != other->_override) - { - return false; - } - - // - // We cannot override if the proxies differ. - // - return _proxy == other->_proxy; -} - -void -Glacier2::Request::response(bool ok, pair outParams) -{ - assert(_proxy->ice_isTwoway()); - _response(ok, outParams); -} - -void -Glacier2::Request::exception(exception_ptr ex) -{ - // - // Only for twoways, oneway dispatches are finished when queued, see queued(). - // - if (_proxy->ice_isTwoway()) - { - _exception(ex); - } -} - -void -Glacier2::Request::queued() -{ - if (!_proxy->ice_isTwoway()) - { - _response(true, {nullptr, nullptr}); - } -} - -Glacier2::RequestQueue::RequestQueue( - shared_ptr requestQueueThread, - shared_ptr instance, - shared_ptr connection) - : _requestQueueThread(std::move(requestQueueThread)), - _instance(std::move(instance)), - _connection(std::move(connection)), - _pendingSend(false), - _destroyed(false) -{ -} - -bool -Glacier2::RequestQueue::addRequest(shared_ptr request) -{ - lock_guard lg(_mutex); - if (_destroyed) - { - throw Ice::ObjectNotExistException(__FILE__, __LINE__); - } - - if (request->hasOverride()) - { - for (auto& r : _requests) - { - // - // If the new request overrides an old one, then abort the old - // request and replace it with the new request. - // - if (request->override(r)) - { - if (_observer) - { - _observer->overridden(!_connection); - } - request->queued(); - r = std::move(request); - return true; - } - } - } - - // - // No override, we add the new request. - // - if (_requests.empty() && (!_connection || !_pendingSend)) - { - _requestQueueThread->flushRequestQueue(shared_from_this()); // This might throw if the thread is destroyed. - } - request->queued(); - _requests.push_back(std::move(request)); - if (_observer) - { - _observer->queued(!_connection); - } - return false; -} - -void -Glacier2::RequestQueue::flushRequests() -{ - lock_guard lg(_mutex); - if (_connection) - { - if (_pendingSend) - { - return; - } - flush(); - } - else - { - for (const auto& request : _requests) - { - if (_observer) - { - _observer->forwarded(!_connection); - } - auto self = shared_from_this(); - request->invoke( - [self, request](bool ok, pair outParams) - { self->response(ok, outParams, request); }, - [self, request](exception_ptr e) { self->exception(e, request); }); - } - _requests.clear(); - } -} - -void -Glacier2::RequestQueue::destroy() -{ - lock_guard lg(_mutex); - _destroyed = true; -} - -void -Glacier2::RequestQueue::updateObserver(shared_ptr observer) -{ - lock_guard lg(_mutex); - _observer = observer; -} - -void -Glacier2::RequestQueue::flush() -{ - assert(_connection); - _pendingSend = false; - _pendingSendRequest = nullptr; - - deque>::iterator p; - for (p = _requests.begin(); p != _requests.end(); ++p) - { - if (_observer) - { - _observer->forwarded(!_connection); - } - - shared_ptr> isSent = make_shared>(); - shared_ptr> completedExceptionally = make_shared>(); - - auto self = shared_from_this(); - auto request = *p; - - request->invoke( - [self, request](bool ok, pair outParams) - { self->response(ok, outParams, request); }, - [self, request, completedExceptionally](exception_ptr e) - { - completedExceptionally->set_value(); - self->exception(e, request); - }, - [self, request, isSent](bool sentSynchronously) - { - isSent->set_value(); - self->sent(sentSynchronously, request); - }); - - if ((isSent->get_future().wait_for(0s) != future_status::ready) && - (completedExceptionally->get_future().wait_for(0s) != future_status::ready)) - { - _pendingSend = true; - _pendingSendRequest = *p++; - break; - } - } - - if (p == _requests.end()) - { - _requests.clear(); - } - else - { - _requests.erase(_requests.begin(), p); - } -} - -void -Glacier2::RequestQueue::response(bool ok, pair outParams, const shared_ptr& request) -{ - assert(request); - request->response(ok, outParams); -} - -void -Glacier2::RequestQueue::exception(exception_ptr ex, const shared_ptr& request) -{ - if (_connection) - { - lock_guard lg(_mutex); - if (request == _pendingSendRequest) - { - flush(); - } - } - - if (request) - { - request->exception(ex); - } -} - -void -Glacier2::RequestQueue::sent(bool sentSynchronously, const shared_ptr& request) -{ - if (_connection && !sentSynchronously) - { - lock_guard lg(_mutex); - if (request == _pendingSendRequest) - { - flush(); - } - } -} - -Glacier2::RequestQueueThread::RequestQueueThread(std::chrono::milliseconds sleepTime) - : _sleepTime(std::move(sleepTime)), - _destroy(false), - _sleep(false), - _thread([this] { run(); }) -{ -} - -Glacier2::RequestQueueThread::~RequestQueueThread() -{ - assert(_destroy); - assert(_queues.empty()); -} - -void -Glacier2::RequestQueueThread::destroy() -{ - { - lock_guard lg(_mutex); - assert(!_destroy); - _destroy = true; - _sleep = false; - } - - _condVar.notify_one(); - - _thread.join(); -} - -void -Glacier2::RequestQueueThread::flushRequestQueue(shared_ptr queue) -{ - lock_guard lg(_mutex); - - if (_destroy) - { - throw Ice::ObjectNotExistException(__FILE__, __LINE__); - } - - if (_queues.empty() && !_sleep) - { - _condVar.notify_one(); - } - _queues.push_back(std::move(queue)); -} - -void -Glacier2::RequestQueueThread::run() -{ - std::chrono::nanoseconds sleepDuration = 0ns; - - while (true) - { - vector> queues; - - { - unique_lock lock(_mutex); - - // - // Wait indefinitely if there's no requests to - // send. If the queue is being destroyed we still need to - // wait until all the responses for twoway requests are - // received. - // - while (!_destroy && (_queues.empty() || _sleep)) - { - if (_sleep) - { - auto now = chrono::steady_clock::now(); - - if (_condVar.wait_for(lock, sleepDuration) == cv_status::no_timeout) - { - sleepDuration = 0ns; - } - else - { - sleepDuration -= chrono::steady_clock::now() - now; - } - - if (sleepDuration <= 0ns) - { - _sleep = false; - } - } - else - { - _condVar.wait(lock); - } - } - - // - // If the queue is being destroyed and there's no requests or responses - // to send, we're done. - // - if (_destroy && _queues.empty()) - { - return; - } - - assert(!_queues.empty() && !_sleep); - - queues.swap(_queues); - - if (_sleepTime > 0ms) - { - _sleep = true; - sleepDuration = _sleepTime; - } - } - - for (const auto& queue : queues) - { - queue->flushRequests(); - } - } -} diff --git a/cpp/src/Glacier2/RequestQueue.h b/cpp/src/Glacier2/RequestQueue.h deleted file mode 100644 index 4141f1cb9ab..00000000000 --- a/cpp/src/Glacier2/RequestQueue.h +++ /dev/null @@ -1,112 +0,0 @@ -// -// Copyright (c) ZeroC, Inc. All rights reserved. -// - -#ifndef REQUEST_H -#define REQUEST_H - -#include "Ice/Ice.h" - -#include "Instrumentation.h" - -#include -#include - -namespace Glacier2 -{ - class Instance; - class Request; - class RequestQueueThread; - - class Request - { - public: - Request( - Ice::ObjectPrx, - std::pair, - const Ice::Current&, - bool, - const Ice::Context&, - std::function)>, - std::function); - - void invoke( - std::function)>&&, - std::function&&, - std::function&& = nullptr); - bool override(const std::shared_ptr&) const; - bool hasOverride() const { return !_override.empty(); } - - private: - friend class RequestQueue; - void response(bool, std::pair); - void exception(std::exception_ptr); - void queued(); - - const Ice::ObjectPrx _proxy; - const Ice::ByteSeq _inParams; - const Ice::Current _current; - const bool _forwardContext; - const Ice::Context _sslContext; - const std::string _override; - std::function)> _response; - std::function _exception; - }; - - class RequestQueue : public std::enable_shared_from_this - { - public: - RequestQueue(std::shared_ptr, std::shared_ptr, Ice::ConnectionPtr); - - bool addRequest(std::shared_ptr); - void flushRequests(); - - void destroy(); - - void updateObserver(std::shared_ptr); - - private: - void flush(); - - void response(bool, std::pair, const std::shared_ptr&); - void exception(std::exception_ptr, const std::shared_ptr&); - void sent(bool, const std::shared_ptr&); - - const std::shared_ptr _requestQueueThread; - const std::shared_ptr _instance; - const Ice::ConnectionPtr _connection; - - std::deque> _requests; - bool _pendingSend; - std::shared_ptr _pendingSendRequest; - bool _destroyed; - std::shared_ptr _observer; - - std::mutex _mutex; - }; - - class RequestQueueThread - { - public: - RequestQueueThread(std::chrono::milliseconds); - ~RequestQueueThread(); - - void flushRequestQueue(std::shared_ptr); - void destroy(); - - private: - void run(); - - const std::chrono::milliseconds _sleepTime; - bool _destroy; - bool _sleep; - - std::vector> _queues; - - std::mutex _mutex; - std::condition_variable _condVar; - std::thread _thread; - }; -} - -#endif diff --git a/cpp/src/Glacier2/RouterI.cpp b/cpp/src/Glacier2/RouterI.cpp index c6c6963288c..d7ae24554ff 100644 --- a/cpp/src/Glacier2/RouterI.cpp +++ b/cpp/src/Glacier2/RouterI.cpp @@ -24,8 +24,6 @@ Glacier2::RouterI::RouterI( : _instance(std::move(instance)), _routingTable(make_shared(_instance->communicator(), _instance->proxyVerifier())), _clientBlobject(make_shared(_instance, std::move(filters), context, _routingTable)), - _clientBlobjectBuffered(_instance->clientRequestQueueThread()), - _serverBlobjectBuffered(_instance->serverRequestQueueThread()), _connection(std::move(connection)), _userId(userId), _session(std::move(session)), @@ -91,12 +89,6 @@ Glacier2::RouterI::destroy(function error) } } - _clientBlobject->destroy(); - if (_serverBlobject) - { - _serverBlobject->destroy(); - } - _routingTable->destroy(); } @@ -171,7 +163,7 @@ shared_ptr Glacier2::RouterI::getClientBlobject() const { // Can only be called with the SessionRouterI mutex locked - if (!_clientBlobjectBuffered && _observer) + if (_observer) { _observer->forwarded(true); } @@ -182,7 +174,7 @@ shared_ptr Glacier2::RouterI::getServerBlobject() const { // Can only be called with the SessionRouterI mutex locked - if (!_serverBlobjectBuffered && _observer) + if (_observer) { _observer->forwarded(false); } @@ -201,11 +193,6 @@ Glacier2::RouterI::updateObserver(const shared_ptrupdateObserver(observer, _userId, _connection); - _clientBlobject->updateObserver(_observer); - if (_serverBlobject) - { - _serverBlobject->updateObserver(_observer); - } } string diff --git a/cpp/src/Glacier2/RouterI.h b/cpp/src/Glacier2/RouterI.h index 63dd2614e80..9ed403b2545 100644 --- a/cpp/src/Glacier2/RouterI.h +++ b/cpp/src/Glacier2/RouterI.h @@ -64,8 +64,6 @@ namespace Glacier2 const std::optional _serverProxy; const std::shared_ptr _clientBlobject; const std::shared_ptr _serverBlobject; - const bool _clientBlobjectBuffered; - const bool _serverBlobjectBuffered; const Ice::ConnectionPtr _connection; const std::string _userId; const std::optional _session; diff --git a/cpp/src/Glacier2/msbuild/glacier2router.vcxproj b/cpp/src/Glacier2/msbuild/glacier2router.vcxproj index d39ea0746fa..fda9b5e5f54 100644 --- a/cpp/src/Glacier2/msbuild/glacier2router.vcxproj +++ b/cpp/src/Glacier2/msbuild/glacier2router.vcxproj @@ -105,7 +105,6 @@ - @@ -119,7 +118,6 @@ - diff --git a/cpp/src/Glacier2/msbuild/glacier2router.vcxproj.filters b/cpp/src/Glacier2/msbuild/glacier2router.vcxproj.filters index 97c7be61d68..59799202428 100644 --- a/cpp/src/Glacier2/msbuild/glacier2router.vcxproj.filters +++ b/cpp/src/Glacier2/msbuild/glacier2router.vcxproj.filters @@ -81,9 +81,6 @@ Source Files - - Source Files - Source Files @@ -119,9 +116,6 @@ Header Files - - Header Files - Header Files diff --git a/cpp/src/Ice/PropertyNames.cpp b/cpp/src/Ice/PropertyNames.cpp index d86df42879a..e541949d996 100644 --- a/cpp/src/Ice/PropertyNames.cpp +++ b/cpp/src/Ice/PropertyNames.cpp @@ -1,6 +1,6 @@ // Copyright (c) ZeroC, Inc. -// Generated by makeprops.py from PropertyNames.xml, Fri Sep 27 11:15:19 2024 +// Generated by makeprops.py from PropertyNames.xml, Fri Sep 27 14:21:19 2024 // IMPORTANT: Do not edit this file -- any edits made here will be lost! @@ -1102,10 +1102,7 @@ const IceInternal::Property Glacier2PropsData[] = IceInternal::Property("Glacier2.Client.ThreadPool.Serialize", false, "0", false), IceInternal::Property("Glacier2.Client.ThreadPool.ThreadIdleTime", false, "60", false), IceInternal::Property("Glacier2.Client.MessageSizeMax", false, "", false), - IceInternal::Property("Glacier2.Client.Buffered", false, "1", false), IceInternal::Property("Glacier2.Client.ForwardContext", false, "0", false), - IceInternal::Property("Glacier2.Client.SleepTime", false, "0", false), - IceInternal::Property("Glacier2.Client.Trace.Override", false, "0", false), IceInternal::Property("Glacier2.Client.Trace.Reject", false, "0", false), IceInternal::Property("Glacier2.Client.Trace.Request", false, "0", false), IceInternal::Property("Glacier2.CryptPasswords", false, "", false), @@ -1175,10 +1172,7 @@ const IceInternal::Property Glacier2PropsData[] = IceInternal::Property("Glacier2.Server.ThreadPool.Serialize", false, "0", false), IceInternal::Property("Glacier2.Server.ThreadPool.ThreadIdleTime", false, "60", false), IceInternal::Property("Glacier2.Server.MessageSizeMax", false, "", false), - IceInternal::Property("Glacier2.Server.Buffered", false, "1", false), IceInternal::Property("Glacier2.Server.ForwardContext", false, "0", false), - IceInternal::Property("Glacier2.Server.SleepTime", false, "0", false), - IceInternal::Property("Glacier2.Server.Trace.Override", false, "0", false), IceInternal::Property("Glacier2.Server.Trace.Request", false, "0", false), IceInternal::Property("Glacier2.SessionManager.EndpointSelection", false, "", false), IceInternal::Property("Glacier2.SessionManager.ConnectionCached", false, "", false), diff --git a/cpp/src/Ice/PropertyNames.h b/cpp/src/Ice/PropertyNames.h index e3965deec8e..39df5f1c684 100644 --- a/cpp/src/Ice/PropertyNames.h +++ b/cpp/src/Ice/PropertyNames.h @@ -1,6 +1,6 @@ // Copyright (c) ZeroC, Inc. -// Generated by makeprops.py from PropertyNames.xml, Fri Sep 27 11:15:19 2024 +// Generated by makeprops.py from PropertyNames.xml, Fri Sep 27 14:21:19 2024 // IMPORTANT: Do not edit this file -- any edits made here will be lost! diff --git a/cpp/test/Glacier2/override/Callback.ice b/cpp/test/Glacier2/override/Callback.ice deleted file mode 100644 index 158c568e657..00000000000 --- a/cpp/test/Glacier2/override/Callback.ice +++ /dev/null @@ -1,28 +0,0 @@ -// -// Copyright (c) ZeroC, Inc. All rights reserved. -// - -#pragma once - -#include "Ice/BuiltinSequences.ice" - -module Test -{ - -interface CallbackReceiver -{ - void callback(int token); - - void callbackWithPayload(Ice::ByteSeq payload); -} - -interface Callback -{ - ["amd"] void initiateCallback(CallbackReceiver* proxy, int token); - - ["amd"] void initiateCallbackWithPayload(CallbackReceiver* proxy); - - void shutdown(); -} - -} diff --git a/cpp/test/Glacier2/override/CallbackI.cpp b/cpp/test/Glacier2/override/CallbackI.cpp deleted file mode 100644 index 9327ecfc97b..00000000000 --- a/cpp/test/Glacier2/override/CallbackI.cpp +++ /dev/null @@ -1,150 +0,0 @@ -// -// Copyright (c) ZeroC, Inc. All rights reserved. -// - -#include "CallbackI.h" -#include "Ice/Ice.h" -#include "TestHelper.h" - -using namespace std; -using namespace Ice; -using namespace Test; - -void -CallbackReceiverI::callback(int token, const Current&) -{ - { - unique_lock lock(_mutex); - checkForHold(lock); - if (token != _lastToken) - { - _callback = 0; - _lastToken = token; - } - ++_callback; - } - _condVar.notify_all(); -} - -void -CallbackReceiverI::callbackWithPayload(Ice::ByteSeq, const Current&) -{ - { - unique_lock lock(_mutex); - checkForHold(lock); - ++_callbackWithPayload; - } - _condVar.notify_all(); -} - -int -CallbackReceiverI::callbackOK(int count, int token) -{ - unique_lock lock(_mutex); - - while (_lastToken != token || _callback < count) - { - _condVar.wait(lock); - } - - _callback -= count; - return _callback; -} - -int -CallbackReceiverI::callbackWithPayloadOK(int count) -{ - unique_lock lock(_mutex); - - while (_callbackWithPayload < count) - { - _condVar.wait(lock); - } - - _callbackWithPayload -= count; - return _callbackWithPayload; -} - -void -CallbackReceiverI::hold() -{ - lock_guard lg(_mutex); - _holding = true; -} - -void -CallbackReceiverI::activate() -{ - { - lock_guard lg(_mutex); - _holding = false; - } - _condVar.notify_all(); -} - -void -CallbackReceiverI::checkForHold(unique_lock& lock) -{ - while (_holding) - { - _condVar.wait(lock); - } -} - -void -CallbackI::initiateCallbackAsync( - optional proxy, - int token, - function response, - function error, - const Current& current) -{ - auto p = current.ctx.find("serverOvrd"); - auto ctx = current.ctx; - if (p != current.ctx.end()) - { - ctx["_ovrd"] = p->second; - } - - if (proxy->ice_isTwoway()) - { - proxy->callbackAsync(token, std::move(response), std::move(error), nullptr, ctx); - } - else - { - proxy->callback(token, ctx); - response(); - } -} - -void -CallbackI::initiateCallbackWithPayloadAsync( - optional proxy, - function response, - function error, - const Current& current) -{ - auto p = current.ctx.find("serverOvrd"); - auto ctx = current.ctx; - if (p != current.ctx.end()) - { - ctx["_ovrd"] = p->second; - } - - Ice::ByteSeq seq(1000 * 1024, byte{0}); - if (proxy->ice_isTwoway()) - { - proxy->callbackWithPayloadAsync(seq, std::move(response), std::move(error), nullptr, ctx); - } - else - { - proxy->callbackWithPayload(seq, ctx); - response(); - } -} - -void -CallbackI::shutdown(const Ice::Current& current) -{ - current.adapter->getCommunicator()->shutdown(); -} diff --git a/cpp/test/Glacier2/override/CallbackI.h b/cpp/test/Glacier2/override/CallbackI.h deleted file mode 100644 index c1ce4391dde..00000000000 --- a/cpp/test/Glacier2/override/CallbackI.h +++ /dev/null @@ -1,53 +0,0 @@ -// -// Copyright (c) ZeroC, Inc. All rights reserved. -// - -#ifndef CALLBACK_I_H -#define CALLBACK_I_H - -#include "Callback.h" -#include - -class CallbackReceiverI final : public Test::CallbackReceiver -{ -public: - void callback(int token, const Ice::Current&) override; - void callbackWithPayload(Ice::ByteSeq, const Ice::Current&) override; - - int callbackOK(int, int); - int callbackWithPayloadOK(int); - - void hold(); - void activate(); - -private: - void checkForHold(std::unique_lock&); - - bool _holding = false; - - int _lastToken = -1; - int _callback = 0; - int _callbackWithPayload = 0; - - std::mutex _mutex; - std::condition_variable _condVar; -}; - -class CallbackI final : public Test::Callback -{ -public: - void initiateCallbackAsync( - std::optional, - int, - std::function, - std::function, - const Ice::Current&) override; - void initiateCallbackWithPayloadAsync( - std::optional, - std::function, - std::function, - const Ice::Current&) override; - void shutdown(const Ice::Current&) override; -}; - -#endif diff --git a/cpp/test/Glacier2/override/Client.cpp b/cpp/test/Glacier2/override/Client.cpp deleted file mode 100644 index db1a095ed02..00000000000 --- a/cpp/test/Glacier2/override/Client.cpp +++ /dev/null @@ -1,207 +0,0 @@ -// -// Copyright (c) ZeroC, Inc. All rights reserved. -// - -#include "CallbackI.h" -#include "Glacier2/Router.h" -#include "Ice/Ice.h" -#include "TestHelper.h" -#include -#include - -using namespace std; -using namespace std::chrono_literals; - -using namespace Ice; -using namespace Test; - -class CallbackClient final : public Test::TestHelper -{ -public: - void run(int, char**) override; -}; - -void -CallbackClient::run(int argc, char** argv) -{ - auto properties = createTestProperties(argc, argv); - properties->setProperty("Ice.Warn.Connections", "0"); - properties->setProperty("Ice.ThreadPool.Client.Serialize", "1"); - - Ice::CommunicatorHolder ich = initialize(argc, argv, properties); - auto communicator = ich.communicator(); - Glacier2::RouterPrx router(communicator, "Glacier2/router:" + getTestEndpoint(50)); - communicator->setDefaultRouter(router); - - ObjectPrx base(communicator, "c/callback:" + getTestEndpoint()); - auto session = router->createSession("userid", "abc123"); - base->ice_ping(); - - auto twoway = uncheckedCast(base); - auto oneway = twoway->ice_oneway(); - auto batchOneway = twoway->ice_batchOneway(); - - communicator->getProperties()->setProperty("Ice.PrintAdapterReady", "0"); - auto adapter = communicator->createObjectAdapterWithRouter("CallbackReceiverAdapter", router); - adapter->activate(); - - string category = router->getCategoryForClient(); - - auto callbackReceiver = make_shared(); - - Identity callbackReceiverIdent; - callbackReceiverIdent.name = "callbackReceiver"; - callbackReceiverIdent.category = category; - auto twowayR = adapter->add(callbackReceiver, callbackReceiverIdent); - auto onewayR = twowayR->ice_oneway(); - - { - cout << "testing client request override... " << flush; - { - for (int i = 0; i < 5; i++) - { - oneway->initiateCallback(twowayR, 0); - oneway->initiateCallback(twowayR, 0); - callbackReceiver->callbackOK(2, 0); - } - } - - { - Ice::Context ctx; - ctx["_ovrd"] = "test"; - for (int i = 0; i < 5; i++) - { - oneway->initiateCallback(twowayR, i, ctx); - oneway->initiateCallback(twowayR, i, ctx); - oneway->initiateCallback(twowayR, i, ctx); - this_thread::sleep_for(100ms); - test(callbackReceiver->callbackOK(1, i) < 3); - } - } - cout << "ok" << endl; - } - - { - cout << "testing server request override... " << flush; - Ice::Context ctx; - ctx["serverOvrd"] = "test"; - for (int i = 0; i < 5; i++) - { - oneway->initiateCallback(onewayR, i, ctx); - oneway->initiateCallback(onewayR, i, ctx); - oneway->initiateCallback(onewayR, i, ctx); - this_thread::sleep_for(100ms); - test(callbackReceiver->callbackOK(1, i) < 3); - } - oneway->initiateCallback(twowayR, 0); - test(callbackReceiver->callbackOK(1, 0) == 0); - - int count = 0; - int nRetry = 0; - do - { - callbackReceiver->hold(); - oneway->initiateCallbackWithPayload(onewayR, ctx); - oneway->initiateCallbackWithPayload(onewayR, ctx); - oneway->initiateCallbackWithPayload(onewayR, ctx); - oneway->initiateCallbackWithPayload(onewayR, ctx); - oneway->initiateCallbackWithPayload(onewayR, ctx); - oneway->initiateCallbackWithPayload(onewayR, ctx); - oneway->initiateCallbackWithPayload(onewayR, ctx); - oneway->initiateCallbackWithPayload(onewayR, ctx); - oneway->initiateCallbackWithPayload(onewayR, ctx); - oneway->initiateCallbackWithPayload(onewayR, ctx); - oneway->initiateCallback(twowayR, 0); - this_thread::sleep_for(chrono::milliseconds(200 + nRetry * 200)); - callbackReceiver->activate(); - test(callbackReceiver->callbackOK(1, 0) == 0); - count = callbackReceiver->callbackWithPayloadOK(0); - callbackReceiver->callbackWithPayloadOK(count); - } while (count == 10 && nRetry++ < 10); - test(count < 10); - - oneway->initiateCallbackWithPayload(twowayR); - oneway->initiateCallbackWithPayload(twowayR); - callbackReceiver->hold(); - oneway->initiateCallbackWithPayload(twowayR); - oneway->initiateCallback(onewayR, 0, ctx); - oneway->initiateCallback(onewayR, 0, ctx); - oneway->initiateCallback(onewayR, 0, ctx); - oneway->initiateCallback(onewayR, 0, ctx); - oneway->initiateCallback(onewayR, 0, ctx); - oneway->initiateCallbackWithPayload(twowayR); - this_thread::sleep_for(1000ms); - callbackReceiver->activate(); - test(callbackReceiver->callbackWithPayloadOK(4) == 0); - - int remainingCallbacks = callbackReceiver->callbackOK(1, 0); - // - // Occasionally, Glacier2 flushes in the middle of our 5 - // callbacks, so we get more than 1 callback - // (in theory we could get up to 5 total - more than 1 extra is extremely unlikely) - // - // The sleep above is also important as we want to have enough - // time to receive this (these) extra callback(s). - // - test(remainingCallbacks <= 4); - if (remainingCallbacks > 0) - { - test(callbackReceiver->callbackOK(remainingCallbacks, 0) == 0); - } - - ctx["_fwd"] = "O"; - - oneway->initiateCallbackWithPayload(twowayR); - callbackReceiver->hold(); - oneway->initiateCallbackWithPayload(twowayR); - oneway->initiateCallback(onewayR, 0, ctx); - oneway->initiateCallback(onewayR, 0, ctx); - oneway->initiateCallback(onewayR, 0, ctx); - oneway->initiateCallback(onewayR, 0, ctx); - oneway->initiateCallback(onewayR, 0, ctx); - oneway->initiateCallbackWithPayload(twowayR); - this_thread::sleep_for(200ms); - callbackReceiver->activate(); - test(callbackReceiver->callbackWithPayloadOK(3) == 0); - remainingCallbacks = callbackReceiver->callbackOK(1, 0); - // Unlikely but sometime we get more than just one callback if the flush - // occurs in the middle of our 5 callbacks. - test(remainingCallbacks <= 3); - if (remainingCallbacks > 0) - { - test(callbackReceiver->callbackOK(remainingCallbacks, 0) == 0); - } - - cout << "ok" << endl; - } - - { - cout << "shutdown... " << flush; - twoway->shutdown(); - - try - { - router->destroySession(); - } - catch (const Ice::LocalException&) - { - test(false); - } - - communicator->setDefaultRouter(nullopt); - auto processBase = communicator->stringToProxy("Glacier2/admin -f Process:" + getTestEndpoint(51)); - auto process = checkedCast(processBase); - process->shutdown(); - try - { - process->ice_ping(); - test(false); - } - catch (const Ice::LocalException&) - { - cout << "ok" << endl; - } - } -} - -DEFINE_TEST(CallbackClient) diff --git a/cpp/test/Glacier2/override/Makefile.mk b/cpp/test/Glacier2/override/Makefile.mk deleted file mode 100644 index ca2fc4153cf..00000000000 --- a/cpp/test/Glacier2/override/Makefile.mk +++ /dev/null @@ -1,10 +0,0 @@ -# -# Copyright (c) ZeroC, Inc. All rights reserved. -# - -$(test)_client_sources = Client.cpp CallbackI.cpp Callback.ice -$(test)_client_dependencies = Glacier2 - -$(test)_server_sources = Server.cpp CallbackI.cpp Callback.ice - -tests += $(test) diff --git a/cpp/test/Glacier2/override/Server.cpp b/cpp/test/Glacier2/override/Server.cpp deleted file mode 100644 index 8732a211d7a..00000000000 --- a/cpp/test/Glacier2/override/Server.cpp +++ /dev/null @@ -1,35 +0,0 @@ -// -// Copyright (c) ZeroC, Inc. All rights reserved. -// - -#include "CallbackI.h" -#include "Ice/Ice.h" -#include "TestHelper.h" - -using namespace std; -using namespace Ice; -using namespace Test; - -class CallbackServer final : public Test::TestHelper -{ -public: - void run(int, char**) override; -}; - -void -CallbackServer::run(int argc, char** argv) -{ - auto properties = createTestProperties(argc, argv); - properties->setProperty("Ice.Warn.Connections", "0"); - properties->setProperty("Ice.Warn.Dispatch", "0"); - properties->setProperty("Ice.ThreadPool.Server.Serialize", "1"); - - Ice::CommunicatorHolder communicator = initialize(argc, argv, properties); - communicator->getProperties()->setProperty("CallbackAdapter.Endpoints", getTestEndpoint()); - auto adapter = communicator->createObjectAdapter("CallbackAdapter"); - adapter->add(make_shared(), Ice::stringToIdentity("c/callback")); - adapter->activate(); - communicator->waitForShutdown(); -} - -DEFINE_TEST(CallbackServer) diff --git a/cpp/test/Glacier2/override/msbuild/client/client.vcxproj b/cpp/test/Glacier2/override/msbuild/client/client.vcxproj deleted file mode 100644 index 5774c289db6..00000000000 --- a/cpp/test/Glacier2/override/msbuild/client/client.vcxproj +++ /dev/null @@ -1,140 +0,0 @@ - - - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - - - - - - - true - true - true - ..\..\Callback.ice - - - true - true - true - ..\..\Callback.ice - - - true - true - true - ..\..\Callback.ice - - - true - true - true - ..\..\Callback.ice - - - - - - true - true - true - ..\..\Callback.ice - - - true - true - true - ..\..\Callback.ice - - - true - true - true - ..\..\Callback.ice - - - true - true - true - ..\..\Callback.ice - - - - - - - {3C394401-8E95-475B-8B35-B90A7CCAE578} - - - - Application - true - $(DefaultPlatformToolset) - - - Application - false - $(DefaultPlatformToolset) - - - Application - true - $(DefaultPlatformToolset) - - - Application - false - $(DefaultPlatformToolset) - - - - - - - - - - - - - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - \ No newline at end of file diff --git a/cpp/test/Glacier2/override/msbuild/client/client.vcxproj.filters b/cpp/test/Glacier2/override/msbuild/client/client.vcxproj.filters deleted file mode 100644 index 88426a16255..00000000000 --- a/cpp/test/Glacier2/override/msbuild/client/client.vcxproj.filters +++ /dev/null @@ -1,96 +0,0 @@ - - - - - {098fb89f-1392-4473-8d40-25ea08b42fd3} - - - {3bb7131d-d1b8-4242-88b7-54cd07c478da} - ice - - - {867dca82-abb3-4378-b8b5-a8930673ebd0} - - - {8dbf43f1-473f-4860-a688-d7f31f84952c} - - - {eaf90c9c-749b-4fe2-a63e-4ebbc16fdac8} - - - {3ceb9acf-c760-4180-915f-4a39ce536e87} - - - {f3a97207-8db1-4529-9046-f637449fd20d} - - - {1f0c51a8-60a7-4f4f-b969-8a6f780fe8f5} - - - {3887453a-ed61-43a4-afe4-684f18653298} - - - {fbde2cfd-2157-4caa-9578-76c4d7e76eb6} - - - {3e9b1b3e-b89b-4632-bff8-dac7eeecad2b} - - - {98ff4a4a-72aa-48a6-9796-d22053fd9b95} - - - {dc3fd182-356f-44f3-944b-3276c80d6841} - - - {8ea96d66-5b6d-4f79-9dc2-2579adebbf54} - - - {ec3e3a08-657f-421b-8b85-0fdb3fe76e74} - - - - - Source Files\x64\Debug - - - Source Files\Win32\Debug - - - Source Files\x64\Release - - - Source Files\Win32\Release - - - Source Files - - - Source Files - - - - - Header Files\x64\Debug - - - Header Files\Win32\Debug - - - Header Files\x64\Release - - - Header Files\Win32\Release - - - Header Files - - - - - - - - Slice Files - - - \ No newline at end of file diff --git a/cpp/test/Glacier2/override/msbuild/client/packages.config b/cpp/test/Glacier2/override/msbuild/client/packages.config deleted file mode 100644 index a36cb289a52..00000000000 --- a/cpp/test/Glacier2/override/msbuild/client/packages.config +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/cpp/test/Glacier2/override/msbuild/server/packages.config b/cpp/test/Glacier2/override/msbuild/server/packages.config deleted file mode 100644 index a36cb289a52..00000000000 --- a/cpp/test/Glacier2/override/msbuild/server/packages.config +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/cpp/test/Glacier2/override/msbuild/server/server.vcxproj b/cpp/test/Glacier2/override/msbuild/server/server.vcxproj deleted file mode 100644 index 45689fc8bc6..00000000000 --- a/cpp/test/Glacier2/override/msbuild/server/server.vcxproj +++ /dev/null @@ -1,140 +0,0 @@ - - - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - {E1510790-AF0B-4FFE-B6AA-B75119793AFC} - - - - Application - true - $(DefaultPlatformToolset) - - - Application - false - $(DefaultPlatformToolset) - - - Application - true - $(DefaultPlatformToolset) - - - Application - false - $(DefaultPlatformToolset) - - - - - - - - - - - - - - - - - - - - - - - - - - - true - true - true - ..\..\Callback.ice - - - true - true - true - ..\..\Callback.ice - - - true - true - true - ..\..\Callback.ice - - - true - true - true - ..\..\Callback.ice - - - - - - - - - true - true - true - ..\..\Callback.ice - - - true - true - true - ..\..\Callback.ice - - - true - true - true - ..\..\Callback.ice - - - true - true - true - ..\..\Callback.ice - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - \ No newline at end of file diff --git a/cpp/test/Glacier2/override/msbuild/server/server.vcxproj.filters b/cpp/test/Glacier2/override/msbuild/server/server.vcxproj.filters deleted file mode 100644 index 438e7a78b1c..00000000000 --- a/cpp/test/Glacier2/override/msbuild/server/server.vcxproj.filters +++ /dev/null @@ -1,96 +0,0 @@ - - - - - {fb3b14a4-b8cd-4c04-b0ec-7e10f70c507c} - - - {ead4474b-50fb-458b-8caa-18e0f90c0625} - ice - - - {8b50e533-d36b-4618-9d31-996bfb0cf5da} - - - {79fde8f6-1add-428e-a166-1b6ba5fb6b25} - - - {4f3855d4-9a99-4ca6-8ce0-010465006442} - - - {09d92148-9751-4d5e-9795-b3f0d0550668} - - - {29d93376-539b-4858-a285-1cc30a97bf1c} - - - {0f17563e-9124-402d-ab36-45c6e0693884} - - - {f0533483-e424-4a93-b5d4-82b2894947d4} - - - {cf2306f6-e533-4b4f-b4da-1448feb1f508} - - - {d5962cdb-542e-400c-b8f2-3f597b7e3941} - - - {9bde2c80-86d2-4769-a702-b313622804b7} - - - {bfd26f75-f32b-44e2-b6b4-46d46b7ec563} - - - {af0c6711-d844-4c00-9468-d296c163d30c} - - - {6e78fbb2-64c5-48fb-a480-781b60bfbc47} - - - - - Source Files - - - Source Files - - - Source Files\x64\Debug - - - Source Files\Win32\Debug - - - Source Files\x64\Release - - - Source Files\Win32\Release - - - - - Header Files\x64\Debug - - - Header Files\Win32\Debug - - - Header Files\x64\Release - - - Header Files\Win32\Release - - - Header Files - - - - - - - - Slice Files - - - \ No newline at end of file diff --git a/cpp/test/Glacier2/override/test.py b/cpp/test/Glacier2/override/test.py deleted file mode 100644 index 5774ebeaa2e..00000000000 --- a/cpp/test/Glacier2/override/test.py +++ /dev/null @@ -1,30 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Copyright (c) ZeroC, Inc. All rights reserved. -# - -# -# Note: we limit the send buffer size with Ice.TCP.SndSize, the -# test relies on send() blocking -# -from Glacier2Util import Glacier2TestSuite - - -routerProps = { - "Ice.Warn.Dispatch": "0", - "Ice.Warn.Connections": "0", - "Ice.TCP.SndSize": "100000", - "Ice.ThreadPool.Server.Serialize": "1", - "Glacier2.Filter.Category.Accept": '"c"', - "Glacier2.PermissionsVerifier": "Glacier2/NullPermissionsVerifier", - "Glacier2.Client.ForwardContext": "1", - "Glacier2.Client.Connection.IdleTimeout": '"30"', - "Glacier2.Client.Trace.Override": "0", - "Glacier2.Client.Trace.Request": "0", - "Glacier2.Server.Trace.Override": "0", - "Glacier2.Server.Trace.Request": "0", - "Glacier2.Client.Buffered=1 --Glacier2.Server.Buffered": "1", - "Glacier2.Client.SleepTime=50 --Glacier2.Server.SleepTime": "50", -} - -Glacier2TestSuite(__name__, routerProps=routerProps) diff --git a/csharp/src/Ice/Internal/PropertyNames.cs b/csharp/src/Ice/Internal/PropertyNames.cs index 775519c1990..5e8f31ac311 100644 --- a/csharp/src/Ice/Internal/PropertyNames.cs +++ b/csharp/src/Ice/Internal/PropertyNames.cs @@ -1,6 +1,6 @@ // Copyright (c) ZeroC, Inc. -// Generated by makeprops.py from PropertyNames.xml, Fri Sep 27 11:15:19 2024 +// Generated by makeprops.py from PropertyNames.xml, Fri Sep 27 14:21:19 2024 // IMPORTANT: Do not edit this file -- any edits made here will be lost! diff --git a/java/src/Ice/src/main/java/com/zeroc/Ice/PropertyNames.java b/java/src/Ice/src/main/java/com/zeroc/Ice/PropertyNames.java index 56940e85548..3d66bee8f10 100644 --- a/java/src/Ice/src/main/java/com/zeroc/Ice/PropertyNames.java +++ b/java/src/Ice/src/main/java/com/zeroc/Ice/PropertyNames.java @@ -1,6 +1,6 @@ // Copyright (c) ZeroC, Inc. -// Generated by makeprops.py from PropertyNames.xml, Fri Sep 27 11:15:19 2024 +// Generated by makeprops.py from PropertyNames.xml, Fri Sep 27 14:21:19 2024 // IMPORTANT: Do not edit this file -- any edits made here will be lost! diff --git a/js/src/Ice/PropertyNames.js b/js/src/Ice/PropertyNames.js index f0a68dc3906..5d80a2131ab 100644 --- a/js/src/Ice/PropertyNames.js +++ b/js/src/Ice/PropertyNames.js @@ -1,6 +1,6 @@ // Copyright (c) ZeroC, Inc. -// Generated by makeprops.py from PropertyNames.xml, Fri Sep 27 11:15:19 2024 +// Generated by makeprops.py from PropertyNames.xml, Fri Sep 27 14:21:19 2024 // IMPORTANT: Do not edit this file -- any edits made here will be lost! diff --git a/scripts/tests/Glacier2/router.py b/scripts/tests/Glacier2/router.py index 90ecd5e7995..79a9fab9179 100644 --- a/scripts/tests/Glacier2/router.py +++ b/scripts/tests/Glacier2/router.py @@ -30,28 +30,14 @@ "Ice.Trace.Retry": 1, } - -def buffered(enabled): - return {"Glacier2.Client.Buffered": enabled, "Glacier2.Server.Buffered": enabled} - - Glacier2TestSuite( __name__, routerProps, [ ClientServerTestCase( - name="client/server with router in unbuffered mode", - servers=[ - Glacier2Router(passwords=passwords, props=buffered(False)), - Server(), - ], - client=Client(args=["--shutdown"]), - traceProps=traceProps, - ), - ClientServerTestCase( - name="client/server with router in buffered mode", + name="client/server with router", servers=[ - Glacier2Router(passwords=passwords, props=buffered(True)), + Glacier2Router(passwords=passwords), Server(), ], clients=[Client(), Client(args=["--shutdown"])],