summaryrefslogtreecommitdiff
path: root/src/mongo/executor
diff options
context:
space:
mode:
authorJonathan Ma <jonathan.ma@mongodb.com>2019-01-14 15:19:24 -0500
committerJonathan Ma <jonathan.ma@mongodb.com>2019-01-15 08:59:09 -0500
commitb489828d0c176e90e47724f6771610227b29f117 (patch)
treee7f577802657c1e12a56103f539b9cafa48afd84 /src/mongo/executor
parentaaec89134a7ce96573f06d48307a244cb1da6733 (diff)
downloadmongo-b489828d0c176e90e47724f6771610227b29f117.tar.gz
SERVER-38073 Adjust error message for timeout in _onAcquireConn
Diffstat (limited to 'src/mongo/executor')
-rw-r--r--src/mongo/executor/network_interface_tl.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/mongo/executor/network_interface_tl.cpp b/src/mongo/executor/network_interface_tl.cpp
index a65d2252d45..512b3fee58b 100644
--- a/src/mongo/executor/network_interface_tl.cpp
+++ b/src/mongo/executor/network_interface_tl.cpp
@@ -350,11 +350,14 @@ Future<RemoteCommandResponse> NetworkInterfaceTL::_onAcquireConn(
_counters.timedOut++;
}
- LOG(2) << "Request " << state->request.id << " timed out"
- << ", deadline was " << state->deadline << ", op was "
- << redact(state->request.toString());
+ const std::string message = str::stream()
+ << "Request " << state->request.id << " timed out"
+ << ", deadline was " << state->deadline.toString() << ", op was "
+ << redact(state->request.toString());
+
+ LOG(2) << message;
state->promise.setError(
- Status(ErrorCodes::NetworkInterfaceExceededTimeLimit, "timed out"));
+ Status(ErrorCodes::NetworkInterfaceExceededTimeLimit, message));
client->cancel(baton);
});