On this page本页内容
replSetMaintenance¶The replSetMaintenance admin command enables or disables the maintenance mode for a secondary member of a replica set.
The command has the following prototype form:
Consider the following behavior when running the replSetMaintenance command:
admin database.replSetMaintenance: true, the member enters the RECOVERING state. While the secondary is RECOVERING:replSetMaintenance: true request, it adds a maintenance mode task to a queue of tasks. If the queue of tasks was empty and now is not, the node will transition to RECOVERING state and begin to reject read requests. When a node receives a replSetMaintenance: false request, it removes a maintenance mode task from the queue (even if that task was initiated by a different client). If the request empties the maintenance mode task queue, the node will return to SECONDARY state.