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

分片缺失集合路由信息

在本页

  • 描述
  • 格式
  • 示例
ShardMissingCollectionRoutingInfo

某个集合缺少分片路由信息。

版本8.0.

{
type: "ShardMissingCollectionRoutingInfo",
description: "<string>",
details: {
namespace: "<string>",
collectionUUID: UUID("<uuid>"),
shard: "<string>"
}
}

ShardMissingCollectionRoutingInfo 不一致文档包含以下字段

字段
类型
描述
类型
字符串

不一致文档的类型。对于此不一致类型,返回 ShardMissingCollectionRoutingInfo 的值。

description
字符串

描述在元数据中找到的不一致性。

details
文档

包含有关数据库和分片集群中不一致存在位置的其他信息的文档。

details.namespace
字符串

指示存在不一致的数据库和集合。

details.collectionUUID
UUID

集合的 UUID。

details.shard
字符串

存在不一致的分片。

使用db.adminCommand() 方法调用 checkMetadataConsistency 命令

db.adminCommand( { checkMetadataConsistency: 1 } )

此方法返回一个游标,包含一批文档,显示在分片元数据中找到的不一致性。以下示例显示了一个包含 ShardMissingCollectionRoutingInfo 不一致性文档的游标

{
cursor: {
id: Long("0"),
ns: "test.$cmd.aggregate",
firstBatch: [
{
type: "ShardMissingCollectionRoutingInfo",
description: "Shard is missing routing information for the collection",
details: {
namespace: "test.authors",
collectionUUID: new UUID("62ebdb7e-a7bb-4151-a620-49d44cef097f"),
shard: "shard02"
}
}
],
},
ok: 1
}

返回

路由表范围重叠