summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/replication_coordinator_impl.cpp
diff options
context:
space:
mode:
authorJason Chan <jason.chan@10gen.com>2020-05-04 17:15:01 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-05-05 18:46:37 +0000
commit9e80c5c46ec01e61e020681b393ce8e529049836 (patch)
tree5c35b719453a82c6ff774324dd5ad7bdf7d7901e /src/mongo/db/repl/replication_coordinator_impl.cpp
parent3390cf27165d49ad7739b447b50927e874ec2c1e (diff)
downloadmongo-9e80c5c46ec01e61e020681b393ce8e529049836.tar.gz
SERVER-47831 numAwaitingTopologyChanges metrics must be changed under ReplicationCoordinator mutex
Diffstat (limited to 'src/mongo/db/repl/replication_coordinator_impl.cpp')
-rw-r--r--src/mongo/db/repl/replication_coordinator_impl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/repl/replication_coordinator_impl.cpp b/src/mongo/db/repl/replication_coordinator_impl.cpp
index 052f2ea4dd6..3f41b3d9870 100644
--- a/src/mongo/db/repl/replication_coordinator_impl.cpp
+++ b/src/mongo/db/repl/replication_coordinator_impl.cpp
@@ -2262,9 +2262,9 @@ std::shared_ptr<const IsMasterResponse> ReplicationCoordinatorImpl::awaitIsMaste
// If clientTopologyVersion is not none, deadline must also be not none.
invariant(deadline);
const TopologyVersion topologyVersion = _topCoord->getTopologyVersion();
- lk.unlock();
IsMasterMetrics::get(opCtx)->incrementNumAwaitingTopologyChanges();
+ lk.unlock();
if (MONGO_unlikely(waitForIsMasterResponse.shouldFail())) {
// Used in tests that wait for this failpoint to be entered before triggering a topology