发布于 2015-09-14 14:55:12 | 256 次阅读 | 评论: 0 | 来源: 网络整理
参数: |
|
---|---|
返回: | disconnects shell. |
Forces the current replica set member to step down as primary and then attempt to avoid election as primary for the designated number of seconds. Produces an error if the current node is not primary.
This function will disconnect the shell briefly and forces a reconnection as the replica set renegotiates which node will be primary. As a result, the shell will display an error even if this command succeeds.
rs.stepDown() provides a wrapper around the database command replSetStepDown.