Docs Menu
Docs Home
/
MongoDB Manual
/ / /

MissingLocalCollection

On this page

  • Description
  • Format
  • Example
MissingLocalCollection

A collection is registered on the sharding catalog but does not exist on the corresponding shard.

New in version 8.0.

{
type: "MissingLocalCollection",
description: "<string>",
details: {
namespace: "<string>",
uuid: UUID("<uuid>"),
shard: "<string>"
}
}

MissingLocalCollection inconsistency documents contain these fields:

Field
Type
Description

type

string

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

UUID

UUID of the collection registered on the sharding catalog.

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

{
cursor: {
id: Long("0"),
ns: "test.$cmd.aggregate",
firstBatch: [
{
type: "MissingLocalCollection",
description: "Collection registered on the sharding catalog not found on the given shards",
details: {
namespace: "test.authors",
uuid: UUID("1ad56770-61e2-48e9-83c6-8ecefe73cfc4"),
shard: "shard02"
}
}
],
},
ok: 1
}

Back

MisplacedCollection