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

TrackedUnshardedCollectionHasMultipleChunks

TrackedUnshardedCollectionHasMultipleChunks

未分片集合包含多个数据段。

8.0版本新增。

{ type: "TrackedUnshardedCollectionHasMultipleChunks", description: "<string>", details: { namespace: "<string>", uuid: UUID("<uuid>"), numChunks: <integer> }}

ZonesRangeOverlap 不一致文档包含以下字段:

字段
类型
说明

type

字符串

不一致文档的类型。 为此不一致类型返回值TrackedUnshardedCollectionHasMultipleChunks 。

description

字符串

描述在元数据中发现的不一致之处。

details

文档

包含有关数据库和分片集群中哪些位置存在不一致的附加信息的文档。

details.namespace

字符串

指示存在不一致的数据库和collection。

details.uuid

UUID

被跟踪集合的UUID 。

details.numChunks

整型

未分片集合上的数据段数。

使用db.adminCommand()方法调用checkMetadataConsistency命令:

db.adminCommand( { checkMetadataConsistency: 1 } )

该方法返回一个游标,其中包含一批文档,显示分片元数据中发现的不一致。 以下示例显示了带有TrackedUnshardedCollectionHasMultipleChunks不一致文档的游标:

{ cursor: { id: Long("0"), ns: "test.$cmd.aggregate", firstBatch: [ { type: "TrackedUnshardedCollectionHasMultipleChunks", description: "Found tracked unsharded collection with more than one chunks", details: { namespace: "test.authors", uuid: UUID("0a5ed8eb-d769-456a-8c8b-c67ee99cfd8a"), numChunks: 2 } } ], }, ok: 1}
给本页内容打分

在此页面上