summaryrefslogtreecommitdiff
path: root/src/mongo/executor
diff options
context:
space:
mode:
authorMisha Tyulenev <misha@mongodb.com>2020-03-12 11:53:58 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-03-12 17:49:34 +0000
commit729b70ce06625ed73b023a6a41a1e4d1a7e58363 (patch)
treec3f099118abd88430fb505fef4b35f72f9ede2a0 /src/mongo/executor
parentbb741a0ab1b2c80844dab55a3beecd83a8250ca4 (diff)
downloadmongo-729b70ce06625ed73b023a6a41a1e4d1a7e58363.tar.gz
SERVER-46512 do not use baton to run hedge requests
Diffstat (limited to 'src/mongo/executor')
-rw-r--r--src/mongo/executor/connection_pool.cpp11
-rw-r--r--src/mongo/executor/network_interface_tl.cpp12
2 files changed, 22 insertions, 1 deletions
diff --git a/src/mongo/executor/connection_pool.cpp b/src/mongo/executor/connection_pool.cpp
index 0cc26800c65..4738ee69971 100644
--- a/src/mongo/executor/connection_pool.cpp
+++ b/src/mongo/executor/connection_pool.cpp
@@ -92,10 +92,21 @@ void ConnectionPool::ConnectionInterface::indicateUsed() {
}
void ConnectionPool::ConnectionInterface::indicateSuccess() {
+ LOGV2_DEBUG(4651201,
+ 4,
+ "Success indicated for connection",
+ "getHostAndPort"_attr = getHostAndPort(),
+ "generation"_attr = getGeneration());
_status = Status::OK();
}
void ConnectionPool::ConnectionInterface::indicateFailure(Status status) {
+ LOGV2_DEBUG(4651202,
+ 4,
+ "Failure indicated for connection",
+ "getHostAndPort"_attr = getHostAndPort(),
+ "generation"_attr = getGeneration(),
+ "status"_attr = status.toString());
_status = std::move(status);
}
diff --git a/src/mongo/executor/network_interface_tl.cpp b/src/mongo/executor/network_interface_tl.cpp
index fbd19671d2c..a41f7e8be2b 100644
--- a/src/mongo/executor/network_interface_tl.cpp
+++ b/src/mongo/executor/network_interface_tl.cpp
@@ -327,6 +327,12 @@ void NetworkInterfaceTL::RequestState::returnConnection(Status status) noexcept
auto connToReturn = std::exchange(conn, {});
+ LOGV2_DEBUG(4651200,
+ logSeverityV1toV2(kDiagnosticLogLevel).toInt(),
+ "Returning a connection to the pool",
+ "status"_attr = status.toString(),
+ "is_hedge"_attr = isHedge);
+
if (!status.isOK()) {
connToReturn->indicateFailure(std::move(status));
return;
@@ -429,7 +435,11 @@ Status NetworkInterfaceTL::startCommand(const TaskExecutor::CallbackHandle& cbHa
if (cmdState->requestOnAny.timeout != cmdState->requestOnAny.kNoTimeout) {
cmdState->deadline = cmdState->stopwatch.start() + cmdState->requestOnAny.timeout;
}
- cmdState->baton = baton;
+
+ // TODO: SERVER-46821
+ if (!cmdState->requestOnAny.hedgeOptions) {
+ cmdState->baton = baton;
+ }
if (_svcCtx && cmdState->requestOnAny.hedgeOptions) {
auto hm = HedgingMetrics::get(_svcCtx);