[SERVER-63344] Avoid cloning the SBE tree inside the plan cache mutex Created: 07/Feb/22  Updated: 29/Oct/23  Resolved: 25/Apr/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.0.0-rc2, 6.0.0-rc3

Type: Task Priority: Major - P3
Reporter: Anton Korshunov Assignee: Ruoxin Xu
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Problem/Incident
Related
Backwards Compatibility: Fully Compatible
Backport Requested:
v6.0
Sprint: QO 2022-04-04, QO 2022-04-18, QO 2022-05-02
Participants:
Linked BF Score: 15

 Description   
  • A cached SBE plan is more expensive to clone than the contents of the classic plan cache.
  • Incurring this expense while holding the lock has been shown to cause additional contention for the mutex in our multi-threaded benchmarks.
  • We can experiment with cloning after dropping the lock by using std::shared_ptr.


 Comments   
Comment by Githook User [ 27/Apr/22 ]

Author:

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

Message: SERVER-63344 Avoid cloning the SBE tree inside the plan cache mutex

(cherry picked from commit 2c0f447cffcf29c906589ca1c17aa9c0739e3e5b)
Branch: v6.0
https://github.com/mongodb/mongo/commit/53bed7ef7717423041b9f3d081fbf449de3dbf56

Comment by Githook User [ 25/Apr/22 ]

Author:

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

Message: SERVER-63344 Avoid cloning the SBE tree inside the plan cache mutex
Branch: master
https://github.com/mongodb/mongo/commit/2c0f447cffcf29c906589ca1c17aa9c0739e3e5b

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