-
Type:
Task
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Storage Execution
-
Fully Compatible
-
Storage Execution 2026-10-12
-
None
-
None
-
None
-
None
-
None
-
None
-
None
The non-multikey fast path in B-tree index key generation assumes that no indexed path in the document traverses an array. For sparse indexes, this assumption is too strong: a document may traverse an array but generate no index keys, and therefore does not require the index to be multikey.
For example, a sparse index on {"a.b": 1} generates no keys for:
{_id: 0, a: [{c: 1}, {c: 2}]}
When validating an index marked non-multikey, key generation currently rejects this document with error 7246301 (field a.b cannot be indexed as an array (multikey)) before determining that the sparse index excludes it. This causes dbCheck's missing-index-key validation to fail on an otherwise valid collection once SERVER-135262 stops marking the index multikey for zero-key documents.
- is depended on by
-
SERVER-135262 A sparse index can be considered multikey even if the would-be multikey document generates no keys
-
- Open
-