sh.enableAutoSplit
Description
New in version 3.4.
Enables auto-splitting for the sharded cluster. Auto-splitting isenabled by default.
sh.enableAutoSplit()
enables the autosplit flag in theconfig.settings
collection.
You can only run sh.enableAutoSplit()
from amongo
shell connected to a mongos
instance. sh.enableAutoSplit()
errors if run on amongod
instance.
Note
Starting in MongoDB 4.2, sh.startBalancer()
also enablesauto-splitting for the sharded cluster.
For more information on chunk splits, seeChunk Splits. For more information about how MongoDBbalances chunks among shards, see:Manage Sharded Cluster Balancer andSharded Cluster Balancer.