[SERVER-80305] [CQF] Improve Bonsai debug logging when group fails to optimize to distinguish between failure and branch/bound Created: 22/Aug/23 Updated: 23/Aug/23 |
|
| Status: | Needs Scheduling |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Ben Shteinfeld | Assignee: | Backlog - Query Optimization |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Query Optimization
|
| Participants: |
| Description |
|
When we invoke the optimizer with debugInfo, we print a trace of the groups and properties that we consider during optimization (example here). We often use these options in unit tests to aid in debugging when writing new rewrites. When we consider a rewrite, we recursively optimize the children of the plan fragment and print the result of that. In the case that optimizeChildren() returns boost::none, we print "failed optimizing". However, there are two cases in which optimizeChildren() returns boost::none:
When debugging, there is no way to distinguish between these two cases. When authoring new rewrites, it would be very helpful to quickly be able to understand which case we are in. The purpose of this ticket is to add logging to be able to distinguish the aforementioned cases. |