On this page本页内容
abortReshardCollection
New in version 5.0.在版本5.0中新增。
During a resharding operation, you can abort the operation with the 在重新分片操作期间,可以使用abortReshardCollection
command.abortReshardCollection
命令中止该操作。
The command has the following syntax:该命令具有以下语法:
{ abortReshardCollection: "<database>.<collection>" }
You can abort a resharding operation at any point until the commit phase. 在提交阶段之前,您可以随时中止重新分片操作。If the resharding operation has reached the commit phase before you run the 如果在运行abortReshardCollection
command, the command returns an error.abortReshardCollection
命令之前,重新分片操作已达到提交阶段,则该命令将返回错误。
The mongosh
provides a wrapper method sh.abortReshardCollection()
.mongosh
提供了一个包装器方法sh.abortReshardCollection()
。
The following example aborts a running resharding operation on the 以下示例中止sales.orders
collection:sales.orders
集合上正在运行的重新分片操作:
db.adminCommand({ abortReshardCollection: "sales.orders" })