Database Manual / Sharding / Reference / Inconsistency Types

ShardCatalogCacheCollectionMetadataMismatch

Description

ShardCatalogCacheCollectionMetadataMismatch

A shard is missing metadata or routing information for a collection.

New in version 8.2.

Format

{
type: "ShardCatalogCacheCollectionMetadataMismatch",
description: "<string>",
details: {
namespace: "<string>",
collectionUUID: UUID("<uuid>"),
details: "<array>"
}
}

ShardCatalogCacheCollectionMetadataMismatch inconsistency documents contain these fields:

FieldTypeDescription

type

string

Type of inconsistency document. Returns a value of ShardCatalogCacheCollectionMetadataMismatch for this inconsistency type.

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.collectionUUID

UUID

UUID of the 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 ShardCatalogCacheCollectionMetadataMismatch inconsistency document:

{
cursor: {
id: Long("0"),
ns: "test.$cmd.aggregate",
firstBatch: [ { type: "ShardCatalogCacheCollectionMetadataMismatch", description: "Shard is missing metadata or routing information for the collection", details: { namespace: "testdb.testcollection", collectionUUID: new UUID("6dc337aa-4c0f-4f98-bc3a-bdfb516fbf51"), details: [] } } ],
},
ok: 1
}