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

Fix not inserting an out of order timestamp into the history store

    • 5
    • StorEng - 2023-01-24
    • v6.2, v6.0, v5.0, v4.4

      During the investigation of the issue WT-10469 where the test test_hs11 is able to find the updates in the history store that shouldn't exist.

      The modification of the test_hs11 test to let the no timestamp tombstone as not globally visible leads to a PANIC failure of reconcilation failed after building the disk image.
      The scenario to reproduce the problem is as follows:

      1. Insert 4 updates to a key.
      2. Updates 1-3 will go to the history store and 4 will go to the datastore after a checkpoint-1.
      3. Eviction occurred removed the page.
      4. Insert another update at timestamp 5 and remove it at timestamp 0.
      5. Start a long running transaction to not let the remove globally visible.
      6. As part of the checkpoint-2, it removes all the updates from the history store from 1-3.
      7. But this checkpoint inserts the new history store update 4 that was written to the disk in checkpoint-1 and tombstone to the data store.
      8. Close the long running transaction.
      9. Evict all the pages from memory.
      10. Insert another update at timestamp 10.
      11. Perform the checkpoint. As part of this checkpoint, we wait for the eviction to clean some dirty content.
      12. This eviction will write data at timestamp 10 to disk and restore the existing tombstone 0 from the data store and move it to the history store.
      13. This tombstone is at timestamp 0, so moving it will remove all the existing history store entries that is data at timestamp 4.
      14. This triggers the panic error.

            Assignee:
            haribabu.kommi@mongodb.com Haribabu Kommi
            Reporter:
            haribabu.kommi@mongodb.com Haribabu Kommi
            Sean Watt
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: