[SERVER-57122] Make RecoveryUnit decorable and use it for uncommited collections and collection catalog updates Created: 21/May/21  Updated: 29/Oct/23  Resolved: 21/Dec/21

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

Type: Task Priority: Major - P3
Reporter: Henrik Edin Assignee: Fausto Leyva (Inactive)
Resolution: Fixed Votes: 0
Labels: neweng, newgrad, techdebt
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-51236 Merge UncommittedCollections with Unc... Closed
Duplicate
is duplicated by SERVER-62059 Make the RecoveryUnit decorable Closed
Related
related to SERVER-57121 Collection isolation should work in S... Backlog
Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2021-12-27
Participants:

 Description   

Systems that need to implement "read your own writes" for uncommitted storage transactions are currently implemented as decorations on the OperationContext. To be able to support multi-document transactions and SideTransactions code needs to manually attach/detach the decoration from OperationContext in the TransactionParticipant.

If we instead had the RecoveryUnit decorable we can build this handling into the WriteUnitOfWork::RecoveryUnitState used by the TransactionParticipant



 Comments   
Comment by Githook User [ 21/Dec/21 ]

Author:

{'name': 'Faustoleyva54', 'email': 'fausto.leyva@mongodb.com', 'username': 'Faustoleyva54'}

Message: SERVER-57122 Make RecoveryUnit decorable and use it for UncommitedCollections and UncommittedCatalogUpdates
Branch: master
https://github.com/mongodb/mongo/commit/d472db4ae5003357906a97ec9fd0eae6beb3deec

Comment by Louis Williams [ 29/Nov/21 ]

My main (minor) concern with this is that it makes debugging harder. Printing decorated objects is a bit more painful than just doing opCtx->_recoveryUnit. I'll live though.

If we do this, we must consider is that this will likely break any custom GDB helpers we have, like this one.

Comment by Connie Chen [ 29/Nov/21 ]

louis.williams to talk about this with henrik.edin

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