sh.getBalancerState()Retorna: booleano
sh.getBalancerState()returnstruewhen 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.
Dica
Compatibilidade
Esse método está disponível em implantações hospedadas nos seguintes ambientes:
- MongoDB Atlas: The fully managed service for MongoDB deployments in the cloud
Importante
This command is not supported in M0 and Flex clusters. For more information, see Unsupported Commands.
MongoDB Enterprise: a versão autogerenciada e baseada em assinatura do MongoDB
MongoDB Community: uma versão com código disponível, de uso gratuito e autogerenciada do MongoDB