sh.disableBalancing()
Description
sh.
disableBalancing
(namespace)- Disables the balancer for thespecified sharded collection. This does not affect the balancing ofchunks for other sharded collections in the same cluster.
Important
You can only run sh.disableBalancing()
on amongos
instance. sh.disableBalancing()
errors if run on mongod
instance.
The sh.disableBalancing()
method has the followingparameter:
ParameterTypeDescriptionnamespace
stringThe namespace of the collection.
For more information on the balancing process, seeManage Sharded Cluster Balancer andSharded Cluster Balancer.