cleanupReshardCollection

On this page本页内容

Definition定义

cleanupReshardCollection

New in version 5.0.在版本5.0中新增

The cleanupReshardCollection command cleans up metadata of a failed resharding operation. cleanupReshardCollection命令清除失败的重新分片操作的元数据。You only need to run this command if a primary failover occurred while you ran a resharding operation.如果在运行重新发送操作时发生了主故障切换,则只需要运行此命令。

The command has the following syntax:该命令具有以下语法:

{
  cleanupReshardCollection: "<database>.<collection>"
}

Example示例

Clean up a Failed Resharding Operation清理失败的重新分片操作

The following example cleans up metadata of a failed resharding operation on the sales.orders collection:以下示例清理sales.orders集合上失败的重新分片操作的元数据:

db.adminCommand({
  cleanupReshardCollection: "sales.orders"
})
Tip提示
←  cleanupOrphanedcommitReshardCollection →