diff options
Diffstat (limited to 'src/mongo/db/repl/replication_coordinator_impl.cpp')
-rw-r--r-- | src/mongo/db/repl/replication_coordinator_impl.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/db/repl/replication_coordinator_impl.cpp b/src/mongo/db/repl/replication_coordinator_impl.cpp index e6af5c08838..d4bd43a16ff 100644 --- a/src/mongo/db/repl/replication_coordinator_impl.cpp +++ b/src/mongo/db/repl/replication_coordinator_impl.cpp @@ -1007,6 +1007,10 @@ bool ReplicationCoordinatorImpl::enterQuiesceModeIfSecondary(Milliseconds quiesc return false; } + // Cancel any ongoing election so that the node cannot become primary once in quiesce mode, + // and do not wait for cancellation to complete. + _cancelElectionIfNeeded(lk); + _inQuiesceMode = true; _quiesceDeadline = _replExecutor->now() + quiesceTime; |