Read the prepared flag in time window as a shared prepared flag for the page deleted structure

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • WT12.0.0
    • Affects Version/s: None
    • Component/s: Btree
    • None
    • Storage Engines - Transactions
    • 167.176
    • SE Transactions - 2026-05-08
    • 5

      Summary

      The WT_PAGE_DELETED structure used for fast truncate operations stores a prepared flag to indicate that the truncation was part of a prepared transaction. When reading the prepared flag from a time window associated with a page-deleted record, it should be interpreted as the shared prepared flag (i.e. WT_TIME_WINDOW_HAS_PREPARE) rather than a standalone field, aligning the fast truncate path with how the rest of the MVCC stack tracks prepare state.

      Motivation

      Prepared fast truncate needs its visibility metadata to be consistent with the general time window representation. Reading the prepared flag as a shared flag ensures that:

      • Visibility checks over deleted pages correctly account for prepare state
      • The data format is extensible for future prepare-related metadata (prepare timestamp, durable timestamp on the page-deleted structure)
      • Code paths that walk page-deleted records do not need special-case logic diverging from normal time window handling

      Acceptance Criteria

      • When reading a time window from a WT_PAGE_DELETED structure, the prepared flag is surfaced as the shared prepared flag in the time window
      • Existing prepare visibility tests pass with no regression
      • No regression in fast truncate correctness tests

            Assignee:
            Chenhao Qu
            Reporter:
            Chenhao Qu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: