sh.disableBalancing()
说明
sh.disableBalancing(namespace)
Disables the balancer for the specified sharded collection. This does not affect the balancing of chunks for other sharded collections in the same cluster.
重要
You can only run
sh.disableBalancing()
on amongos
instance.sh.disableBalancing()
errors if run onmongod
instance.sh.disableBalancing()
方法具有以下参数:Parameter类型说明namespace
字符串
The namespace of the collection.
For more information on the balancing process, see 管理分片集群负载均衡器 and 分片集群负载均衡器.
兼容性
此方法可用于以下环境中托管的部署:
MongoDB Enterprise:基于订阅、自我管理的 MongoDB 版本
MongoDB Community:源代码可用、免费使用且可自行管理的 MongoDB 版本