sh.getBalancerState()
This version of the documentation is archived and no longer supported. View the current documentation to learn how to upgrade your version of MongoDB server.
sh.getBalancerState()
Returns: boolean sh.getBalancerState()
returnstrue
when the balancer is enabled and false if the balancer is disabled. This does not reflect the current state of balancing operations: usesh.isBalancerRunning()
to check the current state of the balancer.