diff options
author | Jason Chan <jason.chan@10gen.com> | 2020-05-04 17:15:01 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-05-05 18:46:37 +0000 |
commit | 9e80c5c46ec01e61e020681b393ce8e529049836 (patch) | |
tree | 5c35b719453a82c6ff774324dd5ad7bdf7d7901e /src/mongo/db/repl/replication_coordinator_impl.cpp | |
parent | 3390cf27165d49ad7739b447b50927e874ec2c1e (diff) | |
download | mongo-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.cpp | 2 |
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 |