sh.disableBalancing()

On this page本页内容

Description描述

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.这不会影响同一集群中其他分片集合的平衡。

Important重要

You can only run sh.disableBalancing() on a mongos instance. 只能在mongos实例上运行sh.disableBalancing()sh.disableBalancing() errors if run on mongod instance.如果在mongod实例上运行sh.disableBalancing(),则它将出错。

The sh.disableBalancing() method has the following parameter:sh.disableBalancing()方法具有以下参数:

Parameter参数Type类型Description描述
namespacestringThe namespace of the collection.

For more information on the balancing process, see Manage Sharded Cluster Balancer and Sharded Cluster Balancer.有关平衡过程的更多信息,请参阅管理分片群集平衡器分片群集平衡器

←  sh.commitReshardCollection()sh.enableBalancing() →