diff options
author | Ben Caimano <ben.caimano@10gen.com> | 2019-06-11 11:19:44 -0400 |
---|---|---|
committer | Ben Caimano <ben.caimano@10gen.com> | 2019-06-11 16:22:53 -0400 |
commit | c5e246473ee692cb5866827ac40f5dba006672dc (patch) | |
tree | 1b1256d3a11fe046ec8647feb4a72b0437242e29 /src/mongo | |
parent | 951f7a2c184af7c5d46945b56dcfbc13fd3c5197 (diff) | |
download | mongo-c5e246473ee692cb5866827ac40f5dba006672dc.tar.gz |
SERVER-41460 dropConnections should shut down affected SpecificPools
Diffstat (limited to 'src/mongo')
-rw-r--r-- | src/mongo/executor/connection_pool.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/mongo/executor/connection_pool.cpp b/src/mongo/executor/connection_pool.cpp index c139d40fe88..15c0a791a66 100644 --- a/src/mongo/executor/connection_pool.cpp +++ b/src/mongo/executor/connection_pool.cpp @@ -441,7 +441,6 @@ void ConnectionPool::shutdown() { stdx::lock_guard lk(_mutex); pair.second->triggerShutdown( Status(ErrorCodes::ShutdownInProgress, "Shutting down the connection pool")); - pair.second->updateState(); } } @@ -454,9 +453,8 @@ void ConnectionPool::dropConnections(const HostAndPort& hostAndPort) { return; auto pool = iter->second; - pool->processFailure( + pool->triggerShutdown( Status(ErrorCodes::PooledConnectionsDropped, "Pooled connections dropped")); - pool->updateState(); } void ConnectionPool::dropConnections(transport::Session::TagMask tags) { @@ -473,9 +471,8 @@ void ConnectionPool::dropConnections(transport::Session::TagMask tags) { if (pool->matchesTags(tags)) continue; - pool->processFailure( + pool->triggerShutdown( Status(ErrorCodes::PooledConnectionsDropped, "Pooled connections dropped")); - pool->updateState(); } } @@ -948,7 +945,6 @@ ConnectionPool::SpecificPool::OwnedConnection ConnectionPool::SpecificPool::take ConnectionInterface* connPtr) { auto conn = takeFromPool(_processingPool, connPtr); if (conn) { - invariant(!_health.isShutdown); return conn; } |