diff options
author | Greg Studer <greg@10gen.com> | 2014-02-28 09:48:20 -0500 |
---|---|---|
committer | Greg Studer <greg@10gen.com> | 2014-03-04 15:34:58 -0500 |
commit | db0c430fe28d4f82e9b7b6fff41037d4d24c73a3 (patch) | |
tree | 155fce8058f42a15c07589aee92d6bce5309c347 | |
parent | be24805004705e204a7640143f05bef408f6b210 (diff) | |
download | mongo-db0c430fe28d4f82e9b7b6fff41037d4d24c73a3.tar.gz |
SERVER-12910 release conns back to pool after every mongos operation
-rw-r--r-- | src/mongo/s/server.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/mongo/s/server.cpp b/src/mongo/s/server.cpp index 507868912f3..620e6cc5374 100644 --- a/src/mongo/s/server.cpp +++ b/src/mongo/s/server.cpp @@ -141,12 +141,6 @@ namespace mongo { try { r.init(); r.process(); - - // Release connections after non-write op - if ( r.expectResponse() ) { - LOG(2) << "release thread local connections back to pool" << endl; - ShardConnection::releaseMyConnections(); - } } catch ( const AssertionException& ex ) { @@ -176,6 +170,9 @@ namespace mongo { // We *always* populate the last error for now le->raiseError( ex.getCode() , ex.what() ); } + + // Release connections back to pool, if any still cached + ShardConnection::releaseMyConnections(); } virtual void disconnected( AbstractMessagingPort* p ) { |