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

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

balancerStop

シャーディングされたクラスター内のバランサーを無効にします。 バランシング ラウンドが進行中の場合、 操作はバランシングが完了するまで待機します。

You can only issue the balancerStop command against the admin database on a mongos instance.

MongoDB 7.0 以降では、バランサーを停止すると、シャーディングされたクラスターの AutoMerger も無効になります。

重要

バランサーを長期間無効のままにすると、シャードのバランスが取れず、クラスターのパフォーマンスが低下する可能性があります。 必要な場合のみバランサーを無効にし、メンテナンスが完了した後にバランサーを再度有効にするようにします。

Tip

In mongosh, this command can also be run through the sh.stopBalancer() 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 Atlas: The fully managed service for MongoDB deployments in the cloud
  • MongoDB Enterprise: サブスクリプションベースの自己管理型 MongoDB バージョン

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

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

db.adminCommand(
{
balancerStop: 1,
maxTimeMS: <number>
}
)
フィールド
タイプ
説明

balancerStop

any

任意の値。

maxTimeMS

integer

バランサーを無効にする時間制限。

デフォルトは 60000 ミリ秒です。

バランサー スレッドを停止するには、 mongosインスタンスに接続して次のコマンドを実行します。

db.adminCommand( { balancerStop: 1 } )
このページを評価