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

sh.abortUnshardCollection()(mongosh方法)

sh.abortUnshardCollection(namespace)

停止正在进行的 unshardCollection 操作。

8.0版本新增。

此方法必须在admin数据库上运行。

此方法可用于以下环境中托管的部署:

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

重要

This command is not supported in M0 and Flex clusters. For more information, see Unsupported Commands.

sh.abortUnshardCollection( "<database>.<collection>" )
字段
类型
必要性
说明

namespace

字符串

必需

指定要停止取消分片的数据库和集合。

以下示例停止正在进行的sales.us_accounts集合取消分片操作。

sh.abortUnshardCollection( "sales.us_accounts" )