[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: |
|
||||||||
| 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: |