定义
sh.waitForBalancer(wait, timeout, interval)Waits for a change in the state of the balancer.
sh.waitForBalancer()is an internal method, which takes the following arguments:Parameter类型说明wait布尔
可选。 设置为
true以确保负载均衡器现在处于活动状态。 默认值为false,它将一直等到负载均衡停止并变为非活动状态。timeout整型
等待的毫秒数。
interval整型
休眠毫秒数。
兼容性
此方法可用于以下环境中托管的部署:
重要
This command is not supported in MongoDB Atlas clusters. For information on Atlas support for all commands, see Unsupported Commands.
MongoDB Enterprise:基于订阅、自我管理的 MongoDB 版本
MongoDB Community:源代码可用、免费使用且可自行管理的 MongoDB 版本