On this page本页内容
replSetMaintenance
The replSetMaintenance
admin command enables or disables the maintenance mode for a secondary member of a replica set.replSetMaintenance
admin命令可启用或禁用副本集辅助成员的维护模式。
The command has the following prototype form:该命令具有以下原型形式:
{ replSetMaintenance: <boolean> }
Consider the following behavior when running the 运行replSetMaintenance
command:replSetMaintenance
命令时,请考虑以下行为:
admin
database.admin
数据库运行该命令。When enabled 当启用replSetMaintenance: true
, the member enters the RECOVERING
state. replSetMaintenance: true
时,成员将进入RECOVERING
状态。While the secondary is 当辅助设备为RECOVERING
:RECOVERING
时:
replSetMaintenance: true
request, it adds a maintenance mode task to a queue of tasks. replSetMaintenance:true
请求时,它会将维护模式任务添加到任务队列中。RECOVERING
state and begin to reject read requests. RECOVERING
状态并开始拒绝读取请求。replSetMaintenance: false
request, it removes a maintenance mode task from the queue (even if that task was initiated by a different client). replSetMaintenance:false
请求时,它会从队列中删除维护模式任务(即使该任务是由其他客户端启动的)。SECONDARY
state.SECONDARY
状态。