Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-34443

Refactor how WiredTigerRecoveryUnit and WiredTigerSnapshotManager begin transactions at points in time

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.0.0
    • Affects Version/s: None
    • Component/s: Storage
    • None
    • Fully Compatible
    • ALL
    • Storage NYC 2018-05-07, Storage NYC 2018-05-21

      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.

            Assignee:
            louis.williams@mongodb.com Louis Williams
            Reporter:
            louis.williams@mongodb.com Louis Williams
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: