Docs Menu
Docs Home
/ /

LegacyShardCacheCollectionsPresent

LegacyShardCacheCollectionsPresent

A collection exists in the config.cache.* namespace on a shard where it should not exist.

New in version 9.0.

{
type: "LegacyShardCacheCollectionsPresent",
description: "<string>",
details: {
namespace: "<string>",
shard: "<string>"
}
}

LegacyShardCacheCollectionsPresent inconsistency documents contain the following fields:

Field
Type
Description

type

string

Type of inconsistency document. Returns a value of LegacyShardCacheCollectionsPresent 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.shard

string

The shard where the inconsistency exists.

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 LegacyShardCacheCollectionsPresent inconsistency document:

{
cursor: {
id: Long("0"),
ns: "test.$cmd.aggregate",
firstBatch: [
{
type: "LegacyShardCacheCollectionsPresent",
description: "Found legacy non-authoritative shard catalog cache collections on a shard that is fully upgraded",
details: {
namespace: "config.cache.collections",
shard: "shard-rs0"
}
}
],
},
ok: 1
}

Back

InconsistentShardCatalogCollectionMetadata

On this page