rs.freeze() (original) (raw)
rs.freeze(seconds)
Makes the current replica set member ineligible to becomeprimary for the period specified.
Important
mongosh Method
This page documents a mongosh method. This is _not_the documentation for database commands or language-specific drivers, such as Node.js.
For the database command, see the replSetFreeze command.
For MongoDB API drivers, refer to the language-specificMongoDB driver documentation.
The rs.freeze() method has the following parameter:
Parameter | Type | Description |
---|---|---|
seconds | number | The duration the member is ineligible to become primary. |
This method is available in deployments hosted in the following environments:
- MongoDB Enterprise: The subscription-based, self-managed version of MongoDB
- MongoDB Community: The source-available, free-to-use, and self-managed version of MongoDB