SERVER-136302ClosedFixed

Retain traverseF in SBE $elemMatch MatchFrames

_Filed by the AI query bug hunter (qhunt), an agent that reviews query code for corner-case bugs. A differential oracle and the repro below confirmed the bug._ h2. Problem Inside an object {{$elemMatch}}, SBE checks path arrayness for the child's element-relative path against the root document. If the collection has a non-multikey index on a root field with the same name, SBE skips array traversal for that field inside the array elements. Elements whose field is an array then never match. The q

Affected Versions
Versions known to exhibit this issue

No affected versions recorded.

Fixed Versions
Versions that include the fix
9.1.0-rc09.1.0-rc10249.0.7
Components
Server components related to this issue

No components specified.

Labels
Tags and classification
found-by-ai-hunter