-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
----------------------------
Original Description
Description:
Election handoff is now enabled by default. This is configurable via a new server parameter, called "enableElectionHandoff", which accepts boolean values.
With this feature enabled, primaries that step down due to a replSetStepDown command (without force:true) will step up an eligible candidate. That node will call for an election immediately, as opposed to waiting for the election timeout to expire (which is 10 seconds by default). This is thus intended to speed up planned failovers. The primary that steps down picks the best candidate according to the following criteria (in order of importance):
1. It must be caught up and electable.
2. It has the highest priority (among all secondaries that meet #1)
3. Resolve ties by picking the member with the lowest index in the config
The user-facing behavior of the replSetStepDown command remains the same. It will not delay returning to the client. It is possible for the step-up to fail (e.g. due to network issues), in which case we would wait for an election timeout as before.
----------------------------
Description
Scope of changes (files that need work and how much)
- reference/method/rs.stepDown / reference/method/rs.stepDown
- rs configuration
- electionTimeoutMillis – parameters
- Not updating the following because the discussion is more auto failover vs rs.stepDown()
- /replication
- core/replica-set-elections
Impact to other docs outside of this product
none
MVP (work and date?)
Resources (e.g. Scope Docs, Invision)
- documents
-
SERVER-35624 Enable election handoff by default and update affected tests
- Closed
- is duplicated by
-
DOCS-12181 Docs for SERVER-11086: Election handoff to new primary, during stepdown
- Closed