diff options
author | Amirsaman Memaripour <amirsaman.memaripour@mongodb.com> | 2020-06-17 00:26:46 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-06-17 22:21:40 +0000 |
commit | 3a759f941208612252c4a42fdddf1a2beaaf2063 (patch) | |
tree | 4f2203dbcb4c91c2304252e48cc80f721cb272af /src/mongo/executor/connection_pool.cpp | |
parent | cbe0625a55256a3a0023223ae3e1fc6494e721af (diff) | |
download | mongo-3a759f941208612252c4a42fdddf1a2beaaf2063.tar.gz |
SERVER-48511 Improve ConnectionPool error messages
Diffstat (limited to 'src/mongo/executor/connection_pool.cpp')
-rw-r--r-- | src/mongo/executor/connection_pool.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mongo/executor/connection_pool.cpp b/src/mongo/executor/connection_pool.cpp index 19f6bbac6a4..1b390e51078 100644 --- a/src/mongo/executor/connection_pool.cpp +++ b/src/mongo/executor/connection_pool.cpp @@ -1133,9 +1133,8 @@ void ConnectionPool::SpecificPool::updateEventTimer() { std::pop_heap(begin(_requests), end(_requests), RequestComparator{}); auto& request = _requests.back(); - request.second.setError(Status( - ErrorCodes::NetworkInterfaceExceededTimeLimit, - fmt::format("Couldn't get a connection within the time limit of {}", timeout))); + request.second.setError(Status(ErrorCodes::NetworkInterfaceExceededTimeLimit, + "Couldn't get a connection within the time limit")); _requests.pop_back(); // Since we've failed a request, we've interacted with external users @@ -1199,7 +1198,7 @@ void ConnectionPool::SpecificPool::updateController() { invariant(pool->_requests.empty()); } - pool->triggerShutdown(Status(ErrorCodes::ShutdownInProgress, + pool->triggerShutdown(Status(ErrorCodes::ConnectionPoolExpired, str::stream() << "Pool for " << host << " has expired.")); } return; |