Description描述
HiddenShardedCollectionA collection is registered in the在config.collectionscluster catalog under a non-existent database.config.collections群集目录中不存在的数据库下注册了一个集合。New in version 7.0.在版本7.0中新增。
Format格式
{
type: "HiddenShardedCollection",
description: "<string>",
details: {
namespace: "<string>",
collection: "<object>",
}
}
HiddenShardedCollection inconsistency documents contain the following fields:不一致文档包含以下字段:
type | HiddenShardedCollection for this inconsistency type.HiddenShardedCollection的值。 | |
description | ||
details | ||
details.namespace | ||
details.collection |
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 该方法返回一个游标,其中包含一批文档,显示分片元数据中发现的不一致。下面的示例显示了一个带有HiddenShardedCollection inconsistency document:HiddenShardedCollection不一致文档的游标:
{
cursor: {
id: Long("0"),
ns: "test.$cmd.aggregate",
firstBatch: [
{
type: "HiddenShardedCollection",
description: "Found sharded collection but relative database does not exist",
details: {
namespace: "test.authors",
collection: {
_id: "test.authors",
lastmodEpoch: ObjectId("64ddd78de906038182671674"),
lastmod: ISODate("2023-08-17T08:17:17.944Z"),
timestamp: Timestamp(1692260237, 58),
uuid: new UUID("69317741-7bc5-4eca-8877-7858cecf67d6"),
key: {
"skey" : 1
},
unique: false,
noBalance: false
}
}
}
],
},
ok: 1
}