Note
Starting in MongoDB 6.0.3, automatic chunk splitting is not performed. This is because of balancing policy improvements. Auto-splitting commands still exist, but do not perform an operation.
Description
- sh.disableAutoSplit()
- Disables the autosplit flag in the - config.settingscollection. 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.- You can only run - sh.disableAutoSplit()from a- mongoshsession that is connected to a- mongosinstance.- sh.disableAutoSplit()errors if run on a- mongodinstance.- Note- Starting in MongoDB 6.0.3, automatic chunk splitting is not performed. This is because of balancing policy improvements. Auto-splitting commands still exist, but do not perform an operation. - In MongoDB versions earlier than 6.0.3, - sh.stopBalancer()also disables auto-splitting for the sharded cluster.