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

sh.disableMigrations()(mongosh方法)

sh.disableMigrations(namespace)

Disables migrations for the specified namespace of the sharded collection. The balancer does not migrate chunks for the collection you pass to sh.disableMigrations() until migrations are re-enabled using sh.enableMigrations(). For more information on chunk migrations, see Manage Sharded Cluster Balancer.

重要

You can only run sh.disableMigrations() on a mongos instance. If you run sh.enableMigrations() on a mongod instance, the method returns an error.

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

Parameter
类型
说明

namespace

字符串

集合的命名空间

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

注意

您可以使用 sh.status() 验证迁移状态,这会显示每个集合的 allowMigrations字段。

给本页内容打分

在此页面上