Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-7630

Fix a history store entry remove with checkpoint reserved transaction-id

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Critical - P2
    • Resolution: Fixed
    • None
    • WT10.0.1, 4.4.9, 5.0.3, 5.1.0-rc0
    • None
    • 13
    • Storage - Ra 2021-09-06, Storage - Ra 2021-09-20
    • v5.0, v4.4

    Description

      We need to restore the history store value in case of a prepared rollback. If that races with checkpointing the history store, it may lead to data loss. Here's the scenario:

      Eviction writes a prepared update to the disk and the previous version U1 to the history store.

      Checkpoint starts.

      Checkpoint visits that data store page and since it is clean, it keeps it as it is. Therefore, the prepared update is on the data store in that checkpoint.

      We decide to rollback that prepared update. We restore U1 from the history store to the update chain and then remove it from the history store.

      Checkpoint now checkpoints the history store and U1 is now absent from the history store so it is not included.

      The system crashes and we start from the previous checkpoint. Rollback to stable removes the prepared update on the data store but it can't find U1 in the history store to restore. We now lose the data.

      Attachments

        Issue Links

          Activity

            People

              chenhao.qu@mongodb.com Chenhao Qu
              chenhao.qu@mongodb.com Chenhao Qu
              Haribabu Kommi
              Votes:
              0 Vote for this issue
              Watchers:
              16 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: