# Copyright (C) 2023-present MongoDB, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the Server Side Public License, version 1, # as published by MongoDB, Inc. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # Server Side Public License for more details. # # You should have received a copy of the Server Side Public License # along with this program. If not, see # . # # As a special exception, the copyright holders give permission to link the # code of portions of this program with the OpenSSL library under certain # conditions as described in each individual source file and distribute # linked combinations including the program with the OpenSSL library. You # must comply with the Server Side Public License in all respects for # all of the code used other than as permitted herein. If you modify file(s) # with this exception, you may extend this exception to your version of the # file(s), but you are not obligated to do so. If you do not wish to do so, # delete this exception statement from your version. If you delete this # exception statement from all source files in the program, then also delete # it in the license file. # global: cpp_namespace: "mongo" imports: - "mongo/db/basic_types.idl" - "mongo/s/sharding_types.idl" enums: MetadataInconsistencyType: description: "Type of metadata inconsistency." type: string values: kCollectionUUIDMismatch: "CollectionUUIDMismatch" kCorruptedChunkShardKey: "CorruptedChunkShardKey" kCorruptedZoneShardKey: "CorruptedZoneShardKey" kHiddenShardedCollection: "HiddenShardedCollection" kInconsistentIndex: "InconsistentIndex" kMisplacedCollection: "MisplacedCollection" kMissingRoutingTable: "MissingRoutingTable" kMissingShardKeyIndex: "MissingShardKeyIndex" kRoutingTableMissingMaxKey: "RoutingTableMissingMaxKey" kRoutingTableMissingMinKey: "RoutingTableMissingMinKey" kRoutingTableRangeGap: "RoutingTableRangeGap" kRoutingTableRangeOverlap: "RoutingTableRangeOverlap" kShardThinksCollectionIsUnsharded: "ShardThinksCollectionIsUnsharded" kZonesRangeOverlap: "ZonesRangeOverlap" MetadataInconsistencyDescription: description: "Description of each metadata inconsistency." type: string values: kCollectionUUIDMismatch: "Found collection on non primary shard with mismatching UUID" kCorruptedChunkShardKey: "Found chunk with a shard key pattern violation" kCorruptedZoneShardKey: "Found zone with a shard key pattern violation" kHiddenShardedCollection: "Found sharded collection but relative database does not exist" kInconsistentIndex: "Found an index of a sharded collection that is inconsistent between different shards" kMisplacedCollection: "Unsharded collection found on shard different from database primary shard" kMissingRoutingTable: "Found sharded collection without any chunk" kMissingShardKeyIndex: "Found sharded collection without a shard key index" kRoutingTableMissingMaxKey: "Routing table has a gap because last chunk boundary does not reach MaxKey" kRoutingTableMissingMinKey: "Routing table has a gap because first chunk does not start from MinKey" kRoutingTableRangeGap: "Found a gap between two consecutive chunks" kRoutingTableRangeOverlap: "Found two overlapping consecutive chunks" kShardThinksCollectionIsUnsharded: "Shard thinks collection is unsharded while instead is currently sharded" kZonesRangeOverlap: "Found two overlapping zones" MetadataConsistencyCommandLevel: description: "Level mode of the metadata consistency command." type: string values: kClusterLevel: "ClusterLevel" kDatabaseLevel: "DatabaseLevel" kCollectionLevel: "CollectionLevel" structs: MisplacedCollectionDetails: description: "Details about a misplaced collection inconsistency." strict: false fields: namespace: cpp_name: nss type: namespacestring description: "The namespace of the collection that is misplaced." shard: type: shard_id description: "The shard where the collection is placed." localUUID: type: uuid description: "The UUID of the collection that is misplaced." CollectionUUIDMismatchDetails: description: "Details about a UUID mismatch inconsistency." strict: false fields: namespace: cpp_name: nss type: namespacestring description: "The namespace of the collection that has a UUID mismatch." shard: type: shard_id description: "The shard where the UUID mismatch inconsistency has been found." localUUID: type: uuid description: "The UUID of the collection found on the shard." uuid: type: uuid description: "The UUID of the collection found on the config server." MissingShardKeyIndexDetails: description: "Details about a missing shard key index inconsistency." strict: false fields: namespace: cpp_name: nss type: namespacestring description: "The namespace of the collection that is missing a shard key index." shard: type: shard_id description: "The shard where the missing shard key index inconsistency has been found." shardKey: type: object description: "The shard key of the collection." RoutingTableRangeOverlapDetails: description: "Details about a routing table range overlap inconsistency." strict: false fields: namespace: cpp_name: nss type: namespacestring description: "The namespace of the collection." collectionUUID: type: uuid description: "The UUID of the collection." chunkA: type: object description: "The first chunk that overlaps with the second chunk." chunkB: type: object description: "The second chunk that overlaps with the first chunk." RoutingTableRangeGapDetails: description: "Details about a routing table range gap inconsistency." strict: false fields: namespace: cpp_name: nss type: namespacestring description: "The namespace of the collection." collectionUUID: type: uuid description: "The UUID of the collection." chunkA: type: object description: "The first chunk that has a gap with the second chunk." chunkB: type: object description: "The second chunk that has a gap with the first chunk." RoutingTableMissingMinKeyDetails: description: "Details about a routing table missing min key inconsistency." strict: false fields: namespace: cpp_name: nss type: namespacestring description: "The namespace of the collection." collectionUUID: type: uuid description: "The UUID of the collection." minKeyObj: type: object description: "The min key of the collection." globalMin: type: object description: "The expected min key of the collection." RoutingTableMissingMaxKeyDetails: description: "Details about a routing table missing max key inconsistency." strict: false fields: namespace: cpp_name: nss type: namespacestring description: "The namespace of the collection." collectionUUID: type: uuid description: "The UUID of the collection." maxKeyObj: type: object description: "The max key of the collection." globalMax: type: object description: "The expected max key of the collection." CorruptedChunkShardKeyDetails: description: "Details about a corrupted chunk shard key inconsistency." strict: false fields: namespace: cpp_name: nss type: namespacestring description: "The namespace of the collection." collectionUUID: type: uuid description: "The UUID of the collection." chunk: type: object description: "The chunk with a corrupted shard key." shardKeyPattern: type: object description: "The shard key pattern of the collection." CorruptedZoneShardKeyDetails: description: "Details about a corrupted zone shard key inconsistency." strict: false fields: namespace: cpp_name: nss type: namespacestring description: "The namespace of the collection." collectionUUID: type: uuid description: "The UUID of the collection." zone: type: object description: "The zone with a corrupted shard key." shardKeyPattern: type: object description: "The shard key pattern of the collection." HiddenShardedCollectionDetails: description: "Details about a hidden sharded collection inconsistency." strict: false fields: namespace: cpp_name: nss type: namespacestring description: "The namespace of the collection that is hidden." collection: type: object description: "Information about the collection." InconsistentIndexDetails: description: "Details about index inconsistency." strict: false fields: namespace: cpp_name: nss type: namespacestring description: "The namespace of the affected collection." info: type: object description: "Object containing infos about the inconsistent index." MissingRoutingTableDetails: description: "Details about a missing routing table inconsistency." strict: false fields: namespace: cpp_name: nss type: namespacestring description: "The namespace of the collection that has no routing table." collectionUUID: type: uuid description: "The UUID of the collection." ShardThinksCollectionIsUnshardedDetails: description: "Details about shard that thinks collection is unsharded." strict: false fields: namespace: cpp_name: nss type: namespacestring description: "The namespace of the collection." collectionUUID: type: uuid description: "The UUID of the collection." shard: type: shard_id description: "The shard with wrong collection timestamp." ZonesRangeOverlapDetails: description: "Details about a zones range overlap inconsistency." strict: false fields: namespace: cpp_name: nss type: namespacestring description: "The namespace of the collection." collectionUUID: type: uuid description: "The UUID of the collection." zoneA: type: object description: "The first zone that overlaps with the second zone." zoneB: type: object description: "The second zone that overlaps with the first zone." MetadataInconsistencyItem: description: "Object representing a single metadata inconsistency found in a specific shard" strict: false fields: type: type: MetadataInconsistencyType description: "Type of the inconsistency." description: type: string description: "Description about the inconsistency." details: type: object description: "Details about the inconsistency." CommonCheckMetadataRequestFields: description: "Common fields for all checkMetdataConsistency commands" strict: false fields: # TODO SERVER-75675 remove this field and always perform index consistency checks checkIndexes: description: "Enable index consistency checks" type: safeBool optional: true