Description描述
MissingLocalCollectionA collection is registered on the sharding catalog but does not exist on the corresponding shard.一个集合在分片目录上注册,但在相应的分片上不存在。New in version 8.0.在版本8.0中新增。
Format格式
{
type: "MissingLocalCollection",
description: "<string>",
details: {
namespace: "<string>",
uuid: UUID("<uuid>"),
shard: "<string>"
}
}
MissingLocalCollection inconsistency documents contain these fields:不一致文档包含以下字段:
type | MissingLocalCollection for this inconsistency type.MissingLocalCollection值。 | |
description | ||
details | ||
details.namespace | ||
details.uuid | UUID | |
details.shard |
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 该方法返回一个游标,其中包含一批文档,显示分片元数据中发现的不一致。下面的示例显示了带有MissingLocalCollection inconsistency document:MissingLocalCollection不一致文档的游标:
{
cursor: {
id: Long("0"),
ns: "test.$cmd.aggregate",
firstBatch: [
{
type: "MissingLocalCollection",
description: "Collection registered on the sharding catalog not found on the given shards",
details: {
namespace: "test.authors",
uuid: UUID("1ad56770-61e2-48e9-83c6-8ecefe73cfc4"),
shard: "shard02"
}
}
],
},
ok: 1
}