From f44ef61bcfe5a58fefd3617040fd1cbf0534594d Mon Sep 17 00:00:00 2001 From: huayu-ouyang Date: Thu, 17 Sep 2020 22:28:41 +0000 Subject: SERVER-50418 Add exhaustHello to serverStatus --- src/mongo/s/commands/cluster_is_master_cmd.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/mongo/s/commands/cluster_is_master_cmd.cpp') diff --git a/src/mongo/s/commands/cluster_is_master_cmd.cpp b/src/mongo/s/commands/cluster_is_master_cmd.cpp index f24cb3a298d..ced249eb614 100644 --- a/src/mongo/s/commands/cluster_is_master_cmd.cpp +++ b/src/mongo/s/commands/cluster_is_master_cmd.cpp @@ -198,15 +198,16 @@ public: saslMechanismRegistry.advertiseMechanismNamesForUser(opCtx, cmdObj, &result); if (opCtx->isExhaust()) { - LOGV2_DEBUG(23872, 3, "Using exhaust for isMaster protocol"); + LOGV2_DEBUG(23872, 3, "Using exhaust for isMaster or hello protocol"); uassert(51763, - "An isMaster request with exhaust must specify 'maxAwaitTimeMS'", + "An isMaster or hello request with exhaust must specify 'maxAwaitTimeMS'", maxAwaitTimeMSField); invariant(clientTopologyVersion); InExhaustIsMaster::get(opCtx->getClient()->session().get()) - ->setInExhaustIsMaster(true /* inExhaustIsMaster */); + ->setInExhaustIsMaster(true /* inExhaust */, + cmdObj.firstElementFieldNameStringData()); if (clientTopologyVersion->getProcessId() == currentMongosTopologyVersion.getProcessId() && -- cgit v1.2.1