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

IncompatibleUniqueIndexOnShardedCollection

IncompatibleUniqueIndexOnShardedCollection

シャーディングされたコレクションのインデックスには、一意性の要件と互換性のないインデックスオプションがあります。

バージョン8.3の新機能。

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

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

フィールド
タイプ
説明

type

string

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

description

string

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

details

ドキュメント

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

details.namespace

string

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

details.info

ドキュメント

互換性のないユニークインデックスに関する情報。

db.adminCommand() メソッドを使用して、checkIndexes フラグを 1 に設定した checkMetadataConsistency コマンドを呼び出します。

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

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

{ cursor: { id: Long("0"), ns: "test.$cmd.aggregate", firstBatch: [ { type: "IncompatibleUniqueIndexOnShardedCollection", description: "Found incompatible index options with uniqueness in a sharded collection", details: { namespace: "test.authors", info: { index: { v: 2, unique: true, key: { author: 1 }, name: "author_1" }, shard: "test-rs1", issue: "Collation must be simple and the shard key must be a prefix of the index key if the index is unique in a sharded collection", shardKey: { author: 1 } } } } ], }, ok: 1}
このページを評価

項目一覧