sh.setBalancerState()

在本页面

Description

Important

您只能在mongos实例上运行sh.setBalancerState()。如果在mongod实例上运行,则sh.setBalancerState()错误。

sh.setBalancerState()方法具有以下参数:

Parameter Type Description
state boolean 将其设置为true以启用平衡器,并设置为false禁用平衡器。
首页