summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl
diff options
context:
space:
mode:
authorTess Avitabile <tess.avitabile@mongodb.com>2020-04-09 10:51:20 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-04-15 20:15:21 +0000
commitf1daa511e366f79cf95e301e03441b931299c2f1 (patch)
tree2c2fb3e1f5d31f7947fefb5575131f0ef066f19f /src/mongo/db/repl
parent25e77386e7252a3c60c02954bb97a6b1b21247f5 (diff)
downloadmongo-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.cpp3
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();
}
});