Docs HomeMongoDB Manual

sh.getBalancerState()

sh.getBalancerState()
Returns:返回值:boolean

sh.getBalancerState() returns true when the balancer is enabled and false if the balancer is disabled. sh.getBalancerState()在启用平衡器时返回true,在禁用平衡器时返回falseThis does not reflect the current state of balancing operations: use sh.isBalancerRunning() to check the current state of the balancer.这并不反映平衡操作的当前状态:请使用sh.isBalancerRunning()检查平衡器的当前状态。