Navigation
This version of the manual is no longer supported.

replSetStepDown

replSetStepDown
Options:
  • force (boolean) – Forces the primary to step down even if there aren’t any secondary members within 10 seconds of the primary’s latest optime. This option is not available in versions of mongod before 2.0.

The replSetStepDown command forces the primary of the replica set to relinquish its status as primary. This initiates an election for primary. You may specify a number of seconds for the node to avoid election to primary:

{ replSetStepDown: <seconds> }

If you do not specify a value for <seconds>, replSetStepDown will attempt to avoid reelection to primary for 60 seconds.

Warning

replSetStepDown forces all clients currently connected to the database to disconnect. This helps ensure that clients maintain an accurate view of the replica set.

New in version 2.0: If there is no secondary, within 10 seconds of the primary, replSetStepDown will not succeed to prevent long running elections.