On this page本页内容
replSetMaintenance
The replSetMaintenance admin command enables or disables the maintenance mode for a secondary member of a replica set.replSetMaintenanceadmin命令可启用或禁用副本集辅助成员的维护模式。
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状态。