对于 AI 代理:可在 https://www.mongodb.com/zh-cn/docs/llms.txt 获取文档索引—通过在任何 URL 路径后添加 .md 可获取所有页面的 Markdown 版本。
Docs 菜单

sh.enableBalancing()(mongosh方法)

sh.enableBalancing(namespace)

为分片collection的指定命名空间启用负载均衡器。

重要

You can only run sh.enableBalancing() on a mongos instance. sh.enableBalancing() errors if run on mongod instance.

The sh.enableBalancing() method has the following parameter:

Parameter
类型
说明

namespace

字符串

集合的命名空间

重要

sh.enableBalancing() does not start balancing. Rather, it allows balancing of this collection the next time the balancer runs.

有关均衡过程的更多信息,请参阅“托管分片集群负载均衡器”和“分片集群负载均衡器”。

此方法可用于以下环境中托管的部署:

给本页内容打分

在此页面上