sh.getBalancerState()返回: 布尔
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.
提示
兼容性
此方法可用于以下环境中托管的部署:
- MongoDB Atlas:用于云中 MongoDB 部署的完全托管服务
重要
M0 和 Flex 集群不支持此命令。有关更多信息,请参阅不支持的命令。
MongoDB Enterprise:基于订阅、自我管理的 MongoDB 版本
MongoDB Community:源代码可用、免费使用且可自行管理的 MongoDB 版本