replSetFreeze

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数据库发出该命令。

←  replSetAbortPrimaryCatchUpreplSetGetConfig →