文档菜单
文档首页
/
MongoDB 手册
/ / /

丢失的路由表

本页

  • 描述
  • 格式
  • 示例
MissingRoutingTable

存在一个没有路由表的分片集合。

版本7.0.

{
type: "MissingRoutingTable",
description: "<string>",
details: {
namespace: "<string>",
collectionUUID <uuid>
}
}

MissingRoutingTable 不一致性文档包含以下字段

字段
类型
描述
类型
字符串

不一致文档的类型。对于此不一致类型,返回值为 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
}

返回

丢失的本地集合