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

cleanupReshardCollection(数据库命令)

自版本 9.0 起已弃用: cleanupReshardCollection is deprecated. To abort a resharding operation, use abortReshardCollection instead.

cleanupReshardCollection

版本 5.0 中的新增功能。

The cleanupReshardCollection command cleans up metadata of a failed resharding operation. You only need to run this command if a primary failover occurred while you ran a resharding operation.

此命令可用于以下环境中托管的部署:

  • MongoDB Atlas: The fully managed service for MongoDB deployments in the cloud

注意

This command is supported in all MongoDB Atlas clusters. For information on Atlas support for all commands, see Unsupported Commands.

该命令具有以下语法:

db.adminCommand(
{
cleanupReshardCollection: "<database>.<collection>"
}
)

以下示例清除失败的重新分片操作的元数据在collection sales.orders上:

db.adminCommand({
cleanupReshardCollection: "sales.orders"
})
给本页内容打分