diff options
author | Tess Avitabile <tess.avitabile@mongodb.com> | 2020-04-09 10:51:20 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-04-15 20:15:21 +0000 |
commit | f1daa511e366f79cf95e301e03441b931299c2f1 (patch) | |
tree | 2c2fb3e1f5d31f7947fefb5575131f0ef066f19f /src/mongo/db/repl | |
parent | 25e77386e7252a3c60c02954bb97a6b1b21247f5 (diff) | |
download | mongo-f1daa511e366f79cf95e301e03441b931299c2f1.tar.gz |
SERVER-47435 Incrementing topologyVersion for FCV change must update awaitingTopologyChanges
(cherry picked from commit ab61e34c1ad83290e7bbf5a902f09042d80ec493)
Diffstat (limited to 'src/mongo/db/repl')
-rw-r--r-- | src/mongo/db/repl/replication_coordinator_impl.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/db/repl/replication_coordinator_impl.cpp b/src/mongo/db/repl/replication_coordinator_impl.cpp index 889ef531862..1e1104c29ad 100644 --- a/src/mongo/db/repl/replication_coordinator_impl.cpp +++ b/src/mongo/db/repl/replication_coordinator_impl.cpp @@ -3674,6 +3674,8 @@ void ReplicationCoordinatorImpl::_fulfillTopologyChangePromise(WithLock lock) { iter->second->emplaceValue(response); iter->second = std::make_shared<SharedPromise<std::shared_ptr<const IsMasterResponse>>>(); } + + IsMasterMetrics::get(getGlobalServiceContext())->resetNumAwaitingTopologyChanges(); } void ReplicationCoordinatorImpl::incrementTopologyVersion() { @@ -3695,7 +3697,6 @@ ReplicationCoordinatorImpl::_updateMemberStateFromTopologyCoordinator(WithLock l ON_BLOCK_EXIT([&] { if (_rsConfig.isInitialized()) { _fulfillTopologyChangePromise(lk); - IsMasterMetrics::get(getGlobalServiceContext())->resetNumAwaitingTopologyChanges(); } }); |