SERVER-136952Open

SBE $lookup using a partial foreign index drops foreign documents that the index does not contain

Found by an AI bug hunt and confirmed by a differential oracle (SBE vs classic). h2. Problem When the foreign collection has a partial index and $lookup runs in SBE with the dynamic indexed loop join, the join probes the index whenever the local key passes the index's partial filter. It does not check that the index holds every foreign document the key matches. Foreign documents left out of the index are lost from the result. Classic returns them. h2. Repro The test starts its own mongod with

Affected Versions
Versions known to exhibit this issue

No affected versions recorded.

Fixed Versions
Versions that include the fix

No fix available yet.

Components
Server components related to this issue

No components specified.

Labels
Tags and classification
found-by-ai-hunterqe-bf-triage-week