[SERVER-64074] Optimize how we build the DebugInfo for plan cache Created: 01/Mar/22  Updated: 29/Oct/23  Resolved: 15/Mar/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: Ruoxin Xu Assignee: Ruoxin Xu
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Sprint: QO 2022-03-07, QO 2022-03-21
Participants:
Linked BF Score: 0

 Description   

We used to build DebugInfo in the callback function when we are to create a new Entry in the plan cache. After some refactoring in SERVER-59682 we are now constantly building DebugInfo before we are sure to create a new Entry to store in the plan cache. This change caused regression especially when the incoming queries share a same query shape.

This construction of a DebugInfo can be avoided if there already exists a same entry in the cache. Consider fallback to use a callback function to build the DebugInfo rather than construct it upfront.



 Comments   
Comment by Githook User [ 15/Mar/22 ]

Author:

{'name': 'Ruoxin Xu', 'email': 'ruoxin.xu@mongodb.com', 'username': 'RuoxinXu'}

Message: SERVER-64074 Optimize how we build the DebugInfo for plan cache
Branch: master
https://github.com/mongodb/mongo/commit/c51987df9a8b60a98e9f91ff0328208df60427f8

Generated at Thu Feb 08 05:59:27 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.