翻译或纠错本页面

sh.enableBalancing()

On this page

Description

sh.enableBalancing(namespace)

Enables the balancer for the specified namespace of the sharded collection.

The sh.enableBalancing() method has the following parameter:

Parameter Type Description
namespace string The namespace of the collection.

重要

sh.enableBalancing() does not start balancing. Rather, it allows balancing of this collection the next time the balancer runs.

For more information on the balancing process, see 管理集群均衡过程 and Sharded Cluster Balancer.