[SERVER-72934] Avoid creating a metadata merging pipeline for search queries which do not reference $$SEARCH_META Created: 17/Jan/23 Updated: 29/Oct/23 Resolved: 04/Apr/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.0.0-rc0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Nicholas Zolnierz | Assignee: | Alyssa Clark |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | quick-tech-debt | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Query Integration
|
| Backwards Compatibility: | Fully Compatible |
| Sprint: | QO 2023-03-06 |
| Participants: |
| Description |
|
Mongos currently unconditionally builds a metadata merging pipeline with a $setVariableFromSubPipeline stage, even if the tail of the pipeline has no reference to the search metadata ($$SEARCH_META). We can avoid this extra step by analyzing the dependencies of the pipeline suffix and do not build the extra stage if there's no reference to $$SEARCH_META. |