SERVER-137528Backlog

Conditionally pushdown $match past $group in $lookup

The pipeline optimiser applies $match pushdown in subpipelines before selecting the $lookup cache boundary. The $lookup cache (DocumentSourceSequentialDocumentCache) caches the longest initial prefix that meets its requirements: stages must support dependency tracking, must not reference variables defined in the lookup scope, and must not require randomness (with the $search and $vectorSearch exceptions to the dependency-tracking check). A correlated $match ends the cacheable prefix, but earlier

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
P2deps-trackingrule-based-rewrites