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

Rework the tombstone visibility checks for history store cursor previous and next calls

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Critical - P2 Critical - P2
    • WT10.0.0, 4.4.5, 4.9.0-rc1, 5.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • 5
    • Storage - Ra 2021-03-22, Storage - Ra 2021-04-05

      In the current implementation of __curhs_prev_visible(), we keep iterating backwards to find a record that is visible. We continue doing even when we hit an update that has globally visible tombstone. This is problematic for two reasons:

      • If we hit an update that has globally visible tombstone, we will not be able to see any update for the key before that. Therefore, we are wasting effort by continuing to iterate (this is evident from BF-20400).
      • We can potentially reading updates that are older than oldest timestamp. Any updates that are older than timestamps can be freed and result in cursor iteration to read a record that is not valid anymore (which can explain BF-20391). 

      The aim of this ticket is to review and fix __curhs_prev_visible() and run MongoDB patch tests to verify the solution. 

            Assignee:
            haseeb.bokhari@mongodb.com Haseeb Bokhari (Inactive)
            Reporter:
            haseeb.bokhari@mongodb.com Haseeb Bokhari (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: