MisplacedCollection
Description描述
Syntax语法
{
type: "MisplacedCollection",
description: "<string>",
details: {
namespace: "<string>",
shard: "<string>",
localUUID: UUID("<uuid>")
}
}
MisplacedCollection
inconsistency documents contain the following fields:不一致性文档包含以下字段:
type | string | MisplacedCollection for this inconsistency type. MisplacedCollection 值。 |
description | string | |
details | document | |
details.namespace | string | |
details.shard | string | |
details.localUUID | UUID |
Example实例
Use the 使用db.runCommand()
command to call the checkMetadataConsistency
command:db.runCommand()
命令调用checkMetadataConsistency
命令:
db.runCommand( { checkMetadataConsistency: 1 } )
{
cursor: {
id: Long("0"),
ns: "test.$cmd.aggregate",
firstBatch: [
{
type: "MisplacedCollection",
description: "Unsharded collection found on shard different from database primary shard",
details: {
namespace: "test.authors",
shard: "shard02",
localUUID: new UUID("1ad56770-61e2-48e9-83c6-8ecefe73cfc4")
}
}
],
},
ok: 1
}