Description描述
RoutingTableMissingMaxKeyA range gap exists in the routing table. The last chunk boundary in the routing table does not reach the maximum key value.路由表中存在范围间隙。路由表中的最后一个块边界未达到最大键值。New in version 7.0.在版本7.0中新增。
Format格式
{
type: "RoutingTableMissingMaxKey",
description: "<string>",
details: {
namespace: "<string>",
collectionUUID: <string>,
maxKeyObj: { <document> },
globalMax: { <document> }
}
}
RoutingTableMissingMaxKey inconsistency documents contain the following fields:不一致文档包含以下字段:
type | RoutingTableMissingMaxKey for this inconsistency type.RoutingTableMissingMaxKey值。 | |
description | ||
details | ||
details.namespace | ||
details.collectionUUID | UUID | |
details.maxKeyObj | ||
details.globalMax |
Example示例
Use the 使用db.adminCommand() method to call the checkMetadataConsistency command:db.adminCommand()方法调用checkMetadataConsistency命令:
db.adminCommand( { checkMetadataConsistency: 1 } )
The method returns a cursor with a batch of documents showing the inconsistencies found in the sharding metadata. The example below shows a cursor with a 该方法返回一个游标,其中包含一批文档,显示分片元数据中发现的不一致。下面的示例显示了带有RoutingTableMissingMaxKey inconsistency document:RoutingTableMissingMaxKey不一致文档的游标:
{
cursor: {
id: Long("0"),
ns: "test.$cmd.aggregate",
firstBatch: [
{
type: "RoutingTableMissingMaxKey",
description: "Routing table has a gap because last chunk boundary does not reach MaxKey",
details: {
namespace: "test.authors",
collectionUUID: new UUID("62ebdb7e-a7bb-4151-a620-49d44cef097f"),
maxKeyObj: {
x: 0
},
globalMax: {
x: MaxKey
}
}
}
],
},
ok: 1
}