sh.enableAutoSplit
項目一覧
注意
MongoDB 6.0.3以降、 自動チャンク分割は実行されません。 これはバランシング ポリシーの改善によるものです。 自動分割コマンドは引き続き存在しますが、操作は実行されません。
説明
sh.enableAutoSplit()
Enables the autosplit flag in the
config.settings
collection. When auto-splitting is enabled for a sharded cluster, MongoDB automatically splits chunks based on the shard key values the chunk represents to keep the chunks from growing too large.sh.enableAutoSplit()
mongosh
インスタンスに接続されている セッションからのみmongos
を実行できます。{sh.enableAutoSplit()
mongod
インスタンスで実行すると エラーが発生します注意
MongoDB 6.0.3以降、 自動チャンク分割は実行されません。 これはバランシング ポリシーの改善によるものです。 自動分割コマンドは引き続き存在しますが、操作は実行されません。
In MongoDB versions earlier than 6.0.3,
sh.startBalancer()
also enables auto-splitting for the sharded cluster.