This version of the documentation is archived and no longer
supported. View the current documentation to learn how to
upgrade your version of MongoDB.
Description
sh.disableAutoSplit()New in version 3.4.
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.Auto-splitting is enabled by default. For more information on chunk splits, see Chunk Splits.
You can only run
sh.disableAutoSplit()from amongoshell connected to amongosinstance.sh.disableAutoSplit()errors if run on amongodinstance.Note
Starting in MongoDB 4.2,
sh.stopBalancer()also disables auto-splitting for the sharded cluster.