路由表范围重叠
描述
格式
{ type: "RoutingTableRangeOverlap", description: "<string>", details: { namespace: "<string>", collectionUUID: <string>, chunkA: {<document>}, chunkB: {<document>} } }
RoutingTableRangeOverlap
不一致文档包含以下字段
字段 | 类型 | 描述 |
---|---|---|
类型 | 字符串 | 不一致文档的类型。对于此不一致类型,返回值为 |
描述 | 字符串 | 描述在元数据中找到的不一致。 |
详情 | 文档 | 包含有关在数据库和分片集群中不一致存在位置附加信息的文档。 |
details.namespace | 字符串 | 指示存在不一致的数据库和集合。 |
details.collectionUUID | UUID | 集合的UUID。 |
details.chunkA | 文档 | 与第二个数据块重叠的第一个数据块。 |
details.chunkB | 文档 | 与第一个数据块重叠的第二个数据块。 |
示例
使用db.adminCommand()
方法调用checkMetadataConsistency
命令
db.adminCommand( { checkMetadataConsistency: 1 } )
该方法返回一个包含在分片元数据中找到的不一致性的文档批次的游标。以下示例显示了包含RoutingTableRangeOverlap
不一致文档的游标
{ cursor: { id: Long("0"), ns: "test.$cmd.aggregate", firstBatch: [ { type: "RoutingTableRangeOverlap", description: "Found two overlapping consecutive chunks", details: { namespace: "test.authors", collectionUUID: new UUID("62ebdb7e-a7bb-4151-a620-49d44cef097f"), chunkA: { _id: ObjectId("64dde749ac6045c92ef3b9ad"), uuid: new UUID("8c83ea89-ab6b-4ae4-91ab-813cf781284d"), min: { x: MinKey }, max: { x: 0 }, shard: "shard0000", lastmod: Timestamp(1, 0), onCurrentShardSince: Timestamp(1, 0), history: [ { validAfter: Timestamp(1, 0), shard: "shard0000" } ] }, chunkB: { _id: ObjectId("64dde749ac6045c92ef3b9af"), uuid: new UUID("8c83ea89-ab6b-4ae4-91ab-813cf781284d"), min: { x: -10 }, max: { x: MaxKey }, shard: "shard0000", lastmod: Timestamp(1, 0), onCurrentShardSince: Timestamp(1, 0), history: [ { validAfter: Timestamp(1, 0), shard: "shard0000" } ] } } } ], }, ok: 1 }