重要
mongosh 方法
This page documents a mongosh method. This is not the documentation for a language-specific driver, such as Node.js.
如需了解 MongoDB API 驱动程序,请参阅特定语言的 MongoDB 驱动程序文档。
定义
db.collection.getShardVersion()此方法返回有关分片集群中数据状态的信息,该信息在诊断分片集群的根本问题时非常有用。
仅供内部和诊断使用。
兼容性
此方法可用于以下环境中托管的部署:
- 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.
MongoDB Enterprise:基于订阅、自我管理的 MongoDB 版本
MongoDB Community:源代码可用、免费使用且可自行管理的 MongoDB 版本