[SERVER-34443] Refactor how WiredTigerRecoveryUnit and WiredTigerSnapshotManager begin transactions at points in time Created: 12/Apr/18  Updated: 29/Oct/23  Resolved: 15/May/18

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

Type: Bug Priority: Major - P3
Reporter: Louis Williams Assignee: Louis Williams
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-33794 queryOnce should not call obtainMajor... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Storage NYC 2018-05-07, Storage NYC 2018-05-21
Participants:

 Description   

There are 4 different Timestamp member variables and equally as many booleans to track how we open transactions, timestamp transactions, and commit transactions. The relationship between the recovery unit and the snapshot manager is equally as confusing.

There are 5 ways to open a transaction and 2 ways to commit.

On top of that, the ignore_prepare flag has to be set in each of the 5 places we begin transactions, and sometimes with additional configuration parameters.

My suggestions for improvement (at a minimum) are:

  • Only call begin_transaction in one place, potentially as a helper on the WiredTigerSession or the RecoveryUnit itself.
  • Use an enum to keep track of what type of read/commit we are doing for the open transaction.
  • To reduce timestamp confusion we should only have to keep track of 2 timestamps: when to read and when to commit.
  • The SnapshotManager should only keep track of timestamps (or removed completely), and not be the designated caller to open special types of transactions.


 Comments   
Comment by Githook User [ 15/May/18 ]

Author:

{'email': 'louis.williams@mongodb.com', 'username': 'louiswilliams', 'name': 'Louis Williams'}

Message: SERVER-34443 Refactor WiredTigerRecoveryUnit and WiredTigerSnapshotManager. An enum is now used to indicate at which time to read on a RecoveryUnit.
Branch: master
https://github.com/mongodb/mongo/commit/6d2de545a7cfcf4ab23dcf73426a1d50896d6d0c

Comment by Geert Bosch [ 07/May/18 ]

Taking out of epic, as this is not required by the scope or design.

Generated at Thu Feb 08 04:36:42 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.