Investigate apparent regression in classic engine IDHACK
(SERVER-68110)
|
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Sub-task | Priority: | Major - P3 |
| Reporter: | Colin Stolley | Assignee: | Colin Stolley |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Sprint: | QE 2023-05-15 | ||||||||
| Participants: | |||||||||
| Description |
|
In https://github.com/10gen/mongo/blob/master/src/mongo/db/query/sbe_stage_builder.cpp#L128-L139 we end up registering slots for $$USER_ROLES $$NOW $$SEARCH_META regardless of whether the query uses these variables or not. These slots aren't free, so if we could skip some/all when they aren't used, we'd win some perf back. Likewise setUserRoles() is called whether we use $$USER_ROLES or not, and that also is not free, and would be great to only run if needed. |
| Comments |
| Comment by Colin Stolley [ 20/Apr/23 ] |
|
Closing as we can't know whether SEARCH_META will be set later on, so it's impossible to check for at SBE stage creation. Likewise, $$NOW appears to be used in contexts beyond what users might reference in their query, so that too must be kept. That only leaves $$USER_ROLES, which militsa.sotirova@mongodb.com has addressed already in |