abortReshardCollection

On this page本页内容

Definition定义

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()

Example示例

Abort a Resharding Operation中止重新分片操作

The following example aborts a running resharding operation on the sales.orders collection:以下示例中止sales.orders集合上正在运行的重新分片操作

db.adminCommand({
  abortReshardCollection: "sales.orders"
})
Tip提示
See also: 参阅:
←  Sharding CommandsaddShard →