[SERVER-59621] Consider refactoring SBE PlanStage yield preparation & recovery logic Created: 26/Aug/21  Updated: 06/Dec/22

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

Type: Task Priority: Major - P3
Reporter: Ian Boros Assignee: Backlog - Storage Execution Team
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-59620 Remove yield preparation and recovery... Backlog
Assigned Teams:
Storage Execution
Participants:

 Description   

Currently, all SBE PlanStages inherit from the "CanChangeState" CRTP class, providing saveState() and restoreState() methods.

Once the logic for making copies of unowned data and disabling slot access has been removed, only nodes which access storage resources will need non-trivial implementations of saveState() and restoreState(), in order to check if the collection has been dropped during a yield, for example.

This gives an opportunity to refactor the saveState() and restoreState() mechanism. For example, we may want to only provide these methods on nodes which access storage resources, and remove the recursive walk of the execution tree.



 Comments   
Comment by Ian Boros [ 26/Aug/21 ]

I've given this ticket the often controversial "Consider ..." title since this isn't strictly necessary and at this point it isn't clear what the best approach is. I'd like to leave this as a placeholder so I can spend some time trying this out.

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