> For the complete documentation index, see [llms.txt](https://docs.mongoing.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mongoing.com/can-kao/mongo-shell-methods/collection-methods/db-collection-getshardversion.md).

# db.collection.getShardVersion()

* `db.collection.` `getShardVersion` ()
  * 此方法返回有关分片集群中数据的 state 的信息，该信息在诊断分片 cluster 的基础问题时很有用。

仅供内部和诊断使用。

译者：李冠飞

校对：
