CollectionAuxiliaryMetadataMismatch
On this page
Description
Format
{ type: "CollectionAuxiliaryMetadataMismatch", description: "<string>", details: { namespace: "<string>", collectionMetadata: <array> } }
CollectionAuxiliaryMetadataMismatch
inconsistency documents contain these fields:
Field | Type | Description |
---|---|---|
| string | Type of inconsistency document. Returns a value of |
| string | Describes the inconsistency found in the metadata. |
| document | Document with additional information on where the inconsistency exists in the database and sharded cluster. |
| string | Indicates the database and collection where the inconsistency exists. |
| array | Lists the mismatching auxiliary metadata found per shard. |
Example
Use the db.adminCommand()
method to call the
checkMetadataConsistency
command:
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 CollectionAuxiliaryMetadataMismatch
inconsistency document:
{ cursor: { id: Long("0"), ns: "test.$cmd.aggregate", firstBatch: [ { type: "CollectionAuxiliaryMetadataMismatch", description: "Found collection with mismatching auxiliary metadata across shards and/or config server", details: { namespace: "test.authors", collectionMetadata: [ { "md": { "exampleField": 123 }, "shards": [ "shard0" ] }, { "md": { "exampleField": 321 }, "shards": [ "shard1" ] } ] } } ], }, ok: 1 }