AI エージェント向け: ドキュメントインデックスは https://www.mongodb.com/ja-jp/docs/llms.txt で利用できます。すべてのページの markdown バージョンは、いずれかの URL パスに .md を追加することで利用できます。
Docs Menu

replSetfreeze(データベースコマンド)

replSetFreeze

The replSetFreeze command prevents a replica set member from seeking election for the specified number of seconds. Use this command in conjunction with the replSetStepDown command to make a different node in the replica set a primary.

Tip

In mongosh, this command can also be run through the rs.freeze() helper method.

Helper methods are convenient for mongosh users, but they may not return the same level of information as database commands. In cases where the convenience is not needed or the additional return fields are required, use the database command.

このコマンドは、次の環境でホストされている配置で使用できます。

  • MongoDB Enterprise: サブスクリプションベースの自己管理型 MongoDB バージョン

  • MongoDB Community: ソースが利用可能で、無料で使用できる自己管理型の MongoDB のバージョン

重要

このコマンドは、MongoDB Atlas クラスターではサポートされていません。すべてのコマンドに対する Atlas のサポートについては、「サポートされていないコマンド」を参照してください。

このコマンドの構文は、次のとおりです。

db.runCommand(
{
replSetFreeze: <seconds>
}
)

指定した秒数が経過する前にレプリカセット ノードの固定を解除する場合は、 0の 秒値を指定して コマンドを発行できます。

db.runCommand(
{
replSetFreeze: 0
}
)

mongodプロセスを再起動すると、レプリカセット メンバーの固定も解除されます。

replSetFreeze is an administrative command, and you must issue it against the admin database.

このページを評価