Description描述
CollectionUUIDMismatchA collection exists on a shard with a locally registered UUID that differs from the one registered in the分片上存在一个集合,其本地注册的UUID与config.collectionscluster catalog.config.collections集群目录中注册的UUID不同。New in version 7.0.在版本7.0中新增。
Format格式
{
type: "CollectionUUIDMismatch",
description: "<string>",
details: {
namespace: "<string>",
shard: "<string>",
localUUID: UUID("<uuid>"),
uuid: UUID("<uuid>")
}
}
CollectionUUIDMismatch inconsistency documents contain the following fields:不一致文档包含以下字段:
type | CollectionUUIDMismatch for this inconsistency type.CollectionUUIDMismatch的值。 | |
description | ||
details | ||
details.namespace | ||
details.shard | ||
details.localUUID | UUID | |
details.uuid | UUID | config.collections cluster catalog.config.collections群集目录中找到的集合的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 该方法返回一个游标,其中包含一批文档,显示分片元数据中发现的不一致。下面的示例显示了一个带有CollectionUUIDMismatch inconsistency document:CollectionUUIDMismatch不一致文档的游标:
{
cursor: {
id: Long("0"),
ns: "test.$cmd.aggregate",
firstBatch: [
{
type: "CollectionUUIIDMismatch",
description: "Found collection on non primary shard with mismatching UUID",
details: {
namespace: "test.authors",
shard: "shard02",
localUUID: new UUID("1ad56770-61e2-48e9-83c6-8ecefe73cfc4"),
uuid: new UUID("a3153e8a-3544-43ec-928f-37f72b48dee9")
}
}
],
},
ok: 1
}