Refactor ref_changes to address the potential int overflow

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • WT12.0.0, 8.3.0-rc0
    • Affects Version/s: None
    • Component/s: Page deltas
    • None
    • Storage Engines, Storage Engines - Transactions
    • SE Transactions - 2025-10-24
    • 5

      Currently the ref_changes in WT_REF structure is a uint8, it is possible we keep incrementing the value and it overflows at some point. This ticket is to address the potential overflow. There is an existing implementation for page_state we can refer here.

      #define WT_PAGE_CLEAN 0
      #define WT_PAGE_DIRTY_FIRST 1
      #define WT_PAGE_DIRTY 2
          wt_shared uint32_t page_state;
      

      The refactor will be similar as what is currently implemented for the page_state, we also need to introduce a mechanism where ref_changes can be cleared, like what __wt_page_modify_clear does to clear the page_state.

            Assignee:
            Zunyi Liu
            Reporter:
            Zunyi Liu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: