replSetFreeze
The replSetFreeze
command prevents a replica set member from seeking election for the specified number of seconds. replSetFreeze
命令阻止复制集成员在指定的秒数内寻求选择。Use this command in conjunction with the 将此命令与replSetStepDown
command to make a different node in the replica set a primary.replSetStepDown
命令一起使用,以使副本集中的其他节点成为主节点。
The replSetFreeze
command uses the following syntax:replSetFreeze
命令使用以下语法:
{ replSetFreeze: <seconds> }
If you want to unfreeze a replica set member before the specified number of seconds has elapsed, you can issue the command with a seconds value of 如果要在指定的秒数之前解冻副本集成员,可以发出秒值为0
:0
的命令:
{ replSetFreeze: 0 }
Restarting the 重新启动mongod
process also unfreezes a replica set member.mongod
进程也会解冻副本集成员。
replSetFreeze
is an administrative command, and you must issue it against the admin database.是一个管理命令,您必须针对admin
数据库发出该命令。