Use stop transaction range to skip more deleted pages during tree walk

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • WT12.0.0, 9.0.0-rc0
    • Affects Version/s: None
    • Component/s: Btree
    • None
    • Storage Engines - Transactions
    • 192.938
    • SE Transactions - 2026-07-03
    • 5

      Motivation

      _wt_btcur_skip_page decides whether a fully-deleted page can be skipped during a tree walk using _wt_txn_snap_min_visible. The page's time aggregate only carries the newest (maximum) stop transaction, so a page can only be skipped when its entire stop range sits below the reader's snapshot minimum (snap_min). Pages whose deletes committed in a gap between concurrent transactions are not skipped, even though every delete is visible to the reader.

      Approach

      Track the smallest stop transaction (oldest_stop_txn) in the in-memory page-modify time aggregate. This is in-memory only and is never packed into a cell, so there is no on-disk format change. Add __wt_txn_snap_range_visible, which skips a page when no concurrent transaction's id falls within the page's stop-transaction range, proving every stop committed before the snapshot.

      Scope

      Only the in-memory page-modify skip path (__wt_get_page_modify_ta) is changed. The on-disk address-cell path still uses the snap_min bound, since the disk aggregate does not carry the minimum stop transaction.

            Assignee:
            Haribabu Kommi
            Reporter:
            Haribabu Kommi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: