Docs Menu
Docs Home
/
MongoDB Manual
/ / /

ShardThinksCollectionIsUnsharded

On this page

  • Description
  • Format
  • Example
ShardThinksCollectionIsUnsharded

A shard thinks a sharded collection is unsharded.

New in version 7.0.

{
type: "ShardThinksCollectionIsUnsharded",
description: "<string>",
details: {
namespace: "<string>",
collectionUUID: <string>,
shard: {<document>}
}
}

ShardThinksCollectionIsUnsharded inconsistency documents contain the following fields:

Field
Type
Description
type
string

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

description
string

Describes the nature of 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.

details.shard
document

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

{
cursor: {
id: Long("0"),
ns: "test.$cmd.aggregate",
firstBatch: [
{
type: "ShardThinksCollectionIsUnsharded",
description: "Shard thinks collection is unsharded while instead is currently sharded",
details: {
namespace: "test.authors",
collectionUUID: new UUID("8c83ea89-ab6b-4ae4-91ab-813cf781284d"),
shard: "shard-rs0"
}
}
],
},
ok: 1
}

Back

RoutingTableRangeOverlap