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

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

balancerStart

バランサー スレッドを開始します。 コマンドはバランシング ラウンドが開始されるのを待ちません。

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

Tip

In mongosh, this command can also be run through the sh.startBalancer() 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 のバージョン

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

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

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

balancerStart

any

任意の値。

maxTimeMS

integer

任意。 バランサーを有効にするための時間制限。

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

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

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