发布于 2015-09-14 15:04:08 | 98 次阅读 | 评论: 0 | 来源: 网络整理
Options: |
---|
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.
警告
This will force all clients currently connected to the database to disconnect. This help to ensure that clients maintain an accurate view of the replica set.
2.0 新版功能: If there is no secondary, within 10 seconds of the primary, replSetStepDown will not succeed to prevent long running elections.