[SERVER-59708] Make plan_explainer plan cache functionality generic Created: 01/Sep/21 Updated: 29/Oct/23 Resolved: 03/May/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.1.0-rc0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Joshua Lapacik (Inactive) | Assignee: | Peter Volk |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Assigned Teams: |
Query Optimization
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Sprint: | QO 2023-05-15 | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
`plan_explainer.h` is a generic interface that shouldn't depend on either of the classic or SBE flavor of plan cache. At the moment it depends on the classic plan cache due to the method `getCachedPlanStats()`. |
| Comments |
| Comment by Githook User [ 04/May/23 ] |
|
Author: {'name': 'Peter Volk', 'email': 'peter.volk@mongodb.com', 'username': 'HCSPete'}Message: |
| Comment by David Storch [ 05/Jul/22 ] |
|
The getCachedPlanStats() method is only called by the code used for serializing plan cache entries to BSON to support the $planCacheStats aggregation stage. It looks like the only callers are here. At the moment, it is still possible for us to use the classic cache for plans recovered from the cache that execute in SBE. This is currently possible when featureFlagSbePlanCache is disabled, but after Once the classic cache is only used with the classic engine (never with SBE) then getCachedPlanStats can become a non-virtual function and we can delete the implementation from PlanExecutorSBE. I'm moving this ticket to the backlog and marking it "neweng", since it should be a pretty simple task once featureFlagSbeFull is a thing of the past. |
| Comment by Anton Korshunov [ 04/Apr/22 ] |
|
We can do this refactor only once we add support for $group and $lookup queries in SBE plan cache when we stop caching plans in the classic cache for SBE queries. |