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

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

    • 13
    • Storage - Ra 2021-09-06, Storage - Ra 2021-09-20
    • v5.0, v4.4

      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.

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