跟踪的非分片集合有多个数据块
描述
格式
{ type: "TrackedUnshardedCollectionHasMultipleChunks", description: "<string>", details: { namespace: "<string>", uuid: UUID("<uuid>"), numChunks: <integer> } }
TrackedUnshardedCollectionHasMultipleChunks
不一致性文档包含以下字段
字段 | 类型 | 描述 |
---|---|---|
类型 | 字符串 | 不一致文档的类型。对于此不一致类型,返回 |
描述 | 字符串 | 描述在元数据中找到的不一致性。 |
详细信息 | 文档 | 包含关于数据库和分片集群中不一致存在位置额外信息的文档。 |
details.namespace | 字符串 | 指示存在不一致的数据库和集合。 |
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 }