AI エージェント向け: ドキュメントインデックスは https://www.mongodb.com/ja-jp/docs/llms.txt で利用できます。すべてのページの markdown バージョンは、いずれかの URL パスに .md を追加することで利用できます。

一貫性のないインデックス

InconsistentIndex

インデックスが異なるメタデータを含む 2 つの異なるシャードに存在するか、一部のシャードで特定のインデックスが欠落している。

バージョン7.0の新機能。

{ type: "InconsistentIndex", description: "<string>", details: { namespace: "<string>", info: <document> }}

ZonesRangeOverlap 不整合ドキュメントには、次のフィールドが含まれています。

フィールド
タイプ
説明

type

string

不整合ドキュメントのタイプ。 この不整合タイプのInconsistentIndexの値を返します。

description

string

メタデータで見つかった不整合について説明します。

details

ドキュメント

データベースとシャーディングされたクラスターのどの不整合が存在するかに関する追加情報を含むドキュメント。

details.namespace

string

不整合が存在するデータベースとコレクションを示します。

details.info

ドキュメント

コンシステント インデックスに関する情報。

db.adminCommand()コマンドを呼び出すには、checkMetadataConsistency メソッドを使用します。

db.adminCommand( { checkMetadataConsistency: 1, checkIndexes: true} )

メソッドは、シャーディング メタデータにある不整合を示すドキュメントのバッチを含むカーソルを返します。 以下の例では、 ZonesRangeOverlap不整合ドキュメントを持つカーソルを示しています。

{ cursor: { id: Long("0"), ns: "test.$cmd.aggregate", firstBatch: [ { type: "InconsistentIndex", description: "Found an index of a sharded collection that is inconsistent between different shards", details: { namespace: "test.authors", info: { missingFromShards: [ "shard-rs1" ], inconsistentProperties: [ ], indexName: "index1" } } } ], }, ok: 1}
このページを評価

項目一覧