Description描述
ShardCatalogCacheCollectionMetadataMismatchA shard is missing metadata or routing information for a collection.分片缺少集合的元数据或路由信息。New in version 8.2.在版本8.2中新增。
Format格式
{
type: "ShardCatalogCacheCollectionMetadataMismatch",
description: "<string>",
details: {
namespace: "<string>",
collectionUUID: UUID("<uuid>"),
details: "<array>"
}
}
ShardCatalogCacheCollectionMetadataMismatch inconsistency documents contain these fields:不一致文档包含以下字段:
type | ShardCatalogCacheCollectionMetadataMismatch for this inconsistency type.ShardCatalogCacheCollectionMetadataMismatch值。 | |
description | ||
details | ||
details.namespace | ||
details.collectionUUID | UUID |
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 该方法返回一个游标,其中包含一批文档,显示分片元数据中发现的不一致。下面的示例显示了一个带有ShardCatalogCacheCollectionMetadataMismatch inconsistency document:ShardCatalogCacheCollectionMetadataMismatch不一致文档的游标:
{
cursor: {
id: Long("0"),
ns: "test.$cmd.aggregate",
firstBatch: [
{
type: "ShardCatalogCacheCollectionMetadataMismatch",
description: "Shard is missing metadata or routing information for the collection",
details: {
namespace: "testdb.testcollection",
collectionUUID: new UUID("6dc337aa-4c0f-4f98-bc3a-bdfb516fbf51"),
details: []
}
}
],
},
ok: 1
}