丢失的路由表
描述
格式
{ type: "MissingRoutingTable", description: "<string>", details: { namespace: "<string>", collectionUUID <uuid> } }
MissingRoutingTable
不一致性文档包含以下字段
字段 | 类型 | 描述 |
---|---|---|
类型 | 字符串 | 不一致文档的类型。对于此不一致类型,返回值为 |
description | 字符串 | 描述在元数据中找到的不一致性。 |
details | 文档 | 包含有关不一致在数据库和分片集群中存在位置额外信息的文档。 |
details.namespace | 字符串 | 指示存在不一致的数据库和集合。 |
details.collectionUUID | UUID | 没有路由表集合的 UUID。 |
示例
使用db.adminCommand()
方法调用 checkMetadataConsistency
命令
db.adminCommand( { checkMetadataConsistency: 1 } )
此方法返回一个游标,其中包含显示在分片元数据中的不一致性的文档批量。以下示例显示了一个包含 MissingRoutingTable
不一致性文档的游标
{ cursor: { id: Long("0"), ns: "test.$cmd.aggregate", firstBatch: [ { type: "MissingRoutingTable", description: "There is a sharded collection without routing table", details: { namespace: "test.authors", collectionUUID: new UUID("1ad56770-61e2-48e9-83c6-8ecefe73cfc4") } } ], }, ok: 1 }