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

TransactionHistoryIterator should do untimestamped reads during rollback recovery

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.1.13
    • Component/s: Replication
    • Labels:
      None

      Description

      If we are recovering, the lastApplied timestamp could be ahead of the common point in the case of rollback recovery because we do not update the lastAppliedOpTime until after we are done recovering the oplog. TransactionHistoryIterator by default does timestamped reads on the oplog using lastApplied. So this could race with the config.transactions table update (run by a different replication writer thread) whose commitTimestamp is less than the common point and thus less than the read timestamp of the TransactionHistoryIterator. WiredTiger enforces that the commit timestamp of non-prepared transactions (which is the case for config.transactions update) is newer than the latest active reader. See WT-4780. So, we need to make TransactionHistoryIterator read untimestamped to avoid violating WiredTiger rules. This is safe because there should be no concurrent write to the oplog and all oplog entries we need on the transaction oplog chain should also be visible under untimestamped reads.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              lingzhi.deng Lingzhi Deng
              Reporter:
              tess.avitabile Tess Avitabile
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: