From 5af2cac9e0de1bf20eba4790ecc3547c679dfd13 Mon Sep 17 00:00:00 2001 From: Andy Schwerin Date: Thu, 16 Oct 2014 17:30:19 -0400 Subject: SERVER-15535 Do not immediately stand for reelection after stepping down for a higher priority node. --- src/mongo/db/repl/topology_coordinator_impl.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/mongo/db') diff --git a/src/mongo/db/repl/topology_coordinator_impl.cpp b/src/mongo/db/repl/topology_coordinator_impl.cpp index 02d2136ab22..e7a033e4245 100644 --- a/src/mongo/db/repl/topology_coordinator_impl.cpp +++ b/src/mongo/db/repl/topology_coordinator_impl.cpp @@ -919,6 +919,12 @@ namespace { << (latestOpTime.getSecs() - highestPriorityMemberOptime.getSecs()) << " seconds behind"; if (_iAmPrimary()) { + const Date_t until = now + + LastVote::leaseTime.total_milliseconds() + + kHeartbeatInterval.total_milliseconds(); + if (_stepDownUntil < until) { + setStepDownTime(until); + } return _stepDownSelf(); } else { -- cgit v1.2.1