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