[SERVER-63912] Optimize MatchExpressions in unit tests Created: 23/Feb/22 Updated: 06/Dec/22 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Charlie Swanson | Assignee: | Backlog - Query Optimization |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | greenerbuild | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Query Optimization
|
| Participants: |
| Description |
|
There have been two cases recently where it appears the unit test would be exercising logic that wouldn't be hit in production due to MatchExpression::optimize() taking a pass before the logic being tested is actually used. We should consider ways to programmatically enforce these control flow expectations/invariants (e.g. you can't create a MatchExpression and not optimize it), or at least take a look at whether we could move the unit test and standard query path more in line for some of our bigger tests like `query_planner_unit_test`. |