[SERVER-85238] In classic_runtime_planner_for_sbe::CachedPlanner implement replanning for find queries Created: 16/Jan/24  Updated: 07/Feb/24

Status: Open
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Ivan Fefer Assignee: Chi-I Huang
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-85237 Implement classic_runtime_planner_for... Closed
is depended on by SERVER-85239 In classic_runtime_planner_for_sbe::C... Open
Assigned Teams:
Query Execution
Participants:
Story Points: 2

 Description   

Implement basic replanning algorithm:

When SBE plan is retrieved from cache, it will go through SBE trial run phase for us to see if replanning is needed.

Classic runtime planner tracks the number of “works” to determine a budget, but SBE tracks “reads” instead of “works”. Total number of reads, performed by a plan is equal to totalKeysExamined + totalDocsExamined stats.

SBE trial run uses TrialRunTracker to track the number of reads and, optionally, a number of documents that have reached a blocking stage.

We will set read budget for the plan to M * (totalKeysExamined + totalDocsExamined) of the winning plan after the multi-planning, where M is internalQueryCacheEvictionRatio.

We will not track the number of documents that have reached a blocking stage, which is consistent with classic runtime planner behavior.


Generated at Thu Feb 08 06:57:13 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.