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

Fix a bug in RTS that incorrectly restores an update from HS lead to the key removal

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: WT10.0.1, 5.1.0, 4.4.9, 5.0.3
    • Component/s: None
    • Labels:
    • Story Points:
      3
    • Sprint:
      Storage - Ra 2021-09-06, Storage - Ra 2021-09-20
    • Backport Requested:
      v5.0, v4.4

      Description

      In some scenarios when the history store key is written in two pages, it can lead to a scenario where the latest history store update can be behind the old history store update due to the global visibility.

      1. Key 1 -> has two updates with timestamps 10, 20. After reconciliation, the 20 timestamp update is written to the data store and (10-20) as the history store. The history store page is also reconciled.
      2. A new insert happened on that key with the timestamp 30.
      3. The oldest timestamp is set to 40. During reconciliation, the update with timestamp 30 is written to the data store as 0.
      4. A new insert happened with timestamp 60 and it is reconciled to the data store and the old version with timestamp 0 is moved into the history store, but this version inserted in a new page compared to the history store version (10-20).
      5. Checkpoint occurred with the above data files.
      6. RTS happening on the key leads removal of the key due to the restoring of (10-20) history store into the data store.

      The solution to the above problem is to let the Rollback to stable verify the stop timestamp of the history store record is less than the stable timestamp and its stop transaction is visible to the checkpoint snapshot.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              haribabu.kommi Haribabu Kommi
              Reporter:
              haribabu.kommi Haribabu Kommi
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: