On this page本页内容
setAllowMigrations
Prevents the start of new automatic migrations on a collection, prevents in-flight manual migrations from committing, and excludes the collection from new balancer rounds.防止对集合启动新的自动迁移,防止提交正在进行的手动迁移,并将集合排除在新的平衡器循环之外。
The command has the following syntax:该命令具有以下语法:
db.adminCommand( { setAllowMigrations: "<db>.<collection>", allowMigrations: <true|false> } )
The command takes the following parameters:该命令采用以下参数:
setAllowMigrations | string |
|
allowMigrations | boolean |
|
setAllowMigrations
requires the same privileges as 需要与moveChunk
.moveChunk
相同的权限。
This operation prevents migrations on the 此操作阻止在store.inventory
collection:store.inventory
集合上进行迁移:
db.adminCommand( { setAllowMigrations: "store.inventory", allowMigrations: false } )