-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Integration
For SERVER-84130 we had to remove the bucket-level filter with internal LT(E) comparisons. While required for query correctness, the check could be more narrow, for example, in a conjunction with GT(E) it would be still correct to use the LT(E) optimization as the GT(E) would cut off the problematic events with the missing field.
In general, the rewrites of predicates at bucket level might benefit from a more systemic review & refactor – we've seen a few post-release bugs immediately in the area: SERVER-79585, SERVER-84130, SERVER-84207, as well as in integration with other pipeline optimizations: SERVER-79692, SERVER-79637. The code is complex and the logic is spread across multiple helper functions with numerous arguments (~10) in multiple files. The entry point is around createPredicatesOnBucketLevelField().