发布于 2015-09-14 14:55:12 | 250 次阅读 | 评论: 0 | 来源: 网络整理

rs.stepDown(seconds)
参数:
  • seconds (init) – Specify the duration of this operation. If not specified the command uses the default value of 60 seconds.
返回:

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.

最新网友评论  共有(0)条评论 发布评论 返回顶部

Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务