diff options
author | Ben Caimano <ben.caimano@10gen.com> | 2020-07-09 00:21:55 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-07-09 15:48:01 +0000 |
commit | d197778348a350c5b2378038c6f1fd3a9431d539 (patch) | |
tree | 1cdbc403c304e7d4a7f9bad401a856d25bc4df32 | |
parent | 43e2423bae07e13cf624b9d5fb74e62bd1959b19 (diff) | |
download | mongo-d197778348a350c5b2378038c6f1fd3a9431d539.tar.gz |
Revert "SERVER-47352 Return connections inline for NetworkInterfaceTL"
This reverts commit ab0d153626c24173f0ea9a26610c02ffc51d9420.
-rw-r--r-- | src/mongo/executor/network_interface_tl.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mongo/executor/network_interface_tl.cpp b/src/mongo/executor/network_interface_tl.cpp index 647fc1bfb36..dc426f37c85 100644 --- a/src/mongo/executor/network_interface_tl.cpp +++ b/src/mongo/executor/network_interface_tl.cpp @@ -797,16 +797,16 @@ void NetworkInterfaceTL::RequestState::resolve(Future<RemoteCommandResponse> fut .onError([this, anchor = shared_from_this()](Status error) { // The RCRq failed, wrap the error into a RCRsp with the host and duration return RemoteCommandOnAnyResponse(host, std::move(error), stopwatch.elapsed()); - }) - .tapAll([ this, anchor = shared_from_this() ](const auto& swr) noexcept { - invariant(swr.isOK()); - returnConnection(swr.getValue().status); }); std::move(anyFuture) // .thenRunOn(makeGuaranteedExecutor(baton, reactor)) // Switch to the baton/reactor. .getAsync([ this, anchor = shared_from_this() ](auto swr) noexcept { - auto response = uassertStatusOK(std::move(swr)); + auto response = uassertStatusOK(swr); + auto status = response.status; + + returnConnection(status); + auto commandStatus = getStatusFromCommandResult(response.data); // Ignore maxTimeMS expiration errors for hedged reads without triggering the finish // line. |