[SERVER-62576] Do not relinquish cursors across commands for snapshot reads and multi-statement transactions Created: 12/Jan/22 Updated: 06/Dec/22 |
|
| Status: | Open |
| 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: |
|
||||||||||||||||||||||||
| Assigned Teams: |
Storage Execution
|
||||||||||||||||||||||||
| Sprint: | Execution Team 2022-08-08, Execution Team 2022-08-22, Execution Team 2022-09-05, Execution Team 2022-09-19 | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Description |
|
When implementing |
| Comments |
| Comment by Dianna Hohensee (Inactive) [ 19/Sep/22 ] |
|
Additional Relevant Info Note: Multi-document transactions originally cleaned up associated getMore state (ClientCursors) when aborted: |
| Comment by Dianna Hohensee (Inactive) [ 19/Sep/22 ] |
|
See the PR for details on where the work for this ticket was left off, if reviving. I think the solution to this problem will more likely involve a different direction, wherein we choose to merge ClientCursor with TransactionParticipant. Or at least we need to do something about abortTransaction destructing the RecoveryUnit without clearing open getMore state / ClientCursors that hold open storage cursors – RU destructor reasonably invariants that no storage cursors are open. |
| Comment by Dianna Hohensee (Inactive) [ 25/Aug/22 ] |
|
Looks like the command layer/infrastructure is where we stash transaction resources: see here and here. I think the most straightforward / easiest way to handle multi-doc transactions is to have read commands not stash the RU but otherwise perform all the other new logic we're adding for cross cmd positioned cursors. Change the enablement flag to an enum that's either kEnabledStashRecoveryUnit or kEnabledDeferStashingRecoveryUnit – or some such names. |
| Comment by Dianna Hohensee (Inactive) [ 25/Aug/22 ] |
|
Splitting off snapshot reads enablement to |
| Comment by Dianna Hohensee (Inactive) [ 25/Aug/22 ] |