TrackedUnshardedCollectionHasMultipleChunks
On this page
Description
Format
{ type: "TrackedUnshardedCollectionHasMultipleChunks", description: "<string>", details: { namespace: "<string>", uuid: UUID("<uuid>"), numChunks: <integer> } }
TrackedUnshardedCollectionHasMultipleChunks
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.uuid | UUID | UUID of the tracked collection. |
details.numChunks | integer | Number of chunks on the unsharded collection. |
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 TrackedUnshardedCollectionHasMultipleChunks
inconsistency document:
{ cursor: { id: Long("0"), ns: "test.$cmd.aggregate", firstBatch: [ { type: "TrackedUnshardedCollectionHasMultipleChunks", description: "Found tracked unsharded collection with more than one chunks", details: { namespace: "test.authors", uuid: UUID("0a5ed8eb-d769-456a-8c8b-c67ee99cfd8a"), numChunks: 2 } } ], }, ok: 1 }