[SERVER-61737] Make a deep copy of RuntimeEnvironment for SBE plans to cache Created: 25/Nov/21  Updated: 29/Oct/23  Resolved: 21/Jan/22

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

Type: Task 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
is depended on by SERVER-61835 Fix how SBE plan cache deals with Sha... Closed
Backwards Compatibility: Fully Compatible
Sprint: QO 2022-01-10, QO 2022-01-24
Participants:

 Description   

Currently when we copy a sbe::RuntimeEnvironment we only copy the Accessors but the State(including the slots, the type and the state of the slots) is shared among copies. This might cause problems when a real copy of RuntimeEnvironment is needed for Plan caching. 

 

Imagine a case where some data in the RuntimeEnvironment should not be stored in the SBE plan cache, we would need to strip it out from the RuntimeEnvironment before caching the plan, which could affect the plan being executed. Note that the cached plan and the plan to execute share all the slots in RuntimeEnvironment.



 Comments   
Comment by Githook User [ 21/Jan/22 ]

Author:

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

Message: SERVER-61737 Make a deep copy of RuntimeEnvironment for SBE plans to cache
Branch: master
https://github.com/mongodb/mongo/commit/86c4fdeebf9a956e75b0fa12a77a8eeb5ad8dcb4

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