Fix false-positive durable_ts assertion after globally visible tombstone removal

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Timestamps
    • None
    • Storage Engines - Transactions
    • 800.85
    • None
    • None

      Summary

      Two WT_ASSERT_ALWAYS calls in __rec_validate_upd_chain require that prev_upd->upd_durable_ts >= vpack->tw.durable_(stop,start)_ts. This invariant is violated when an obsolete-check pass removes a globally-visible tombstone: the re-inserted update now legitimately sits at a lower timestamp than the on-disk durable_ts it supersedes. The start_ts assert in the same function already has the __wt_txn_upd_visible_all escape; the two durable_ts asserts are missing it, causing spurious assertion failures.

      Impact

      Spurious assertion failure (see also BF-42097). Not a data integrity issue. Affects develop generally.

      File

      • src/reconcile/rec_visibility.c

      Fix

      Add the __wt_txn_upd_visible_all escape to both durable_ts assert sites:

      // src/reconcile/rec_visibility.c — two assert sites
       WT_ASSERT_ALWAYS(session,
         ... || prev_upd->upd_durable_ts >= vpack->tw.durable_stop_ts
      +  || __wt_txn_upd_visible_all(session, prev_upd),
         ...);
      
       WT_ASSERT_ALWAYS(session,
         ... || prev_upd->upd_durable_ts >= vpack->tw.durable_start_ts
      +  || __wt_txn_upd_visible_all(session, prev_upd),
         ...);
      

      Notes

      Discovered during development on the WT-16973 clean-scrub eviction branch (PR #13605). Fix is independent of that feature and should be applied directly to develop.

            Assignee:
            [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            Alexander Gorrod
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: