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以降、 自動チャンク分割は実行されません。 これはバランシング ポリシーの改善によるものです。 自動分割コマンドは引き続き存在しますが、操作は実行されません。
MongoDB バージョン 6.0.3 より前では、
sh.startBalancer()
によってシャーディングされたクラスターの自動分割も有効になります。以下も参照してください。