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

Prepared rollback racing with checkpointing history store may lead to data loss

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Backlog
    • Component/s: None
    • Labels:
      None

      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

          Activity

            People

            Assignee:
            backlog-server-storage-engines Backlog - Storage Engines Team
            Reporter:
            chenhao.qu Chenhao Qu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated: