[SERVER-63259] Fix inaccurate comment relating to SEARCH_META handling in SBE stage builder Created: 03/Feb/22 Updated: 29/Oct/23 Resolved: 28/Feb/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.0.0-rc0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | David Storch | Assignee: | Mihai Andrei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Sprint: | QE 2022-03-07 |
| Participants: |
| Description |
|
This comment implies that the value of the SEARCH_META variable in the SBE RuntimeEnvironment can be set later on. That's not true. There is no downstream code to set the SEARCH_META value. And if there is a value for SEARCH_META inside ExpressionContext::variables, it will already have been set in the RuntimeEnvironment here. After discussing with mihai.andrei, he explained that this code is actually a special case to handle non-$search queries which refer to SEARCH_META. We have an example test in the enterprise modules here. SEARCH_META is supposed to resolve to "missing" for non-$search queries. We currently deal with this in the SBE stage builder by establishing a missing value in the RuntimeEnvironment and then referring to this runtime environment slot later in the SBE plan. We should update the comment to correctly explain why this code exists. |
| Comments |
| Comment by Githook User [ 28/Feb/22 ] |
|
Author: {'name': 'Mihai Andrei', 'email': 'mihai.andrei@10gen.com', 'username': 'mtandrei'}Message: |
| Comment by Githook User [ 25/Feb/22 ] |
|
Author: {'name': 'Mihai Andrei', 'email': 'mihai.andrei@10gen.com', 'username': 'mtandrei'}Message: |