Investigate alternatives for bytes_total underflow handling in __wt_btree_decrease_size

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Checkpoints
    • None

      Investigate the best approach for handling potential underflow in __wt_btree_decrease_size when dealing with disaggregated storage delta chain accounting during reconciliation failures.

      The function __wt_btree_decrease_size currently uses a 0 clamp to prevent underflow. This occurs during reconciliation failures when the entire delta chain is discarded from storage, causing bytes_total to decrease by cumulative size while individual delta sizes were previously added.

      Technical context of reconciliation failures:

      1. Page is marked with WT_BLOCK_INVALID_PAGE_ID
      2. Entire delta chain is discarded from storage
      3. Next reconciliation writes full page image with new page_id
      4. This creates temporary accounting "mismatch" that appears as underflow

      As part of this investigation:

      • Determine the most robust and maintainable approach for handling this accounting scenario
      • Either justify the current 0 clamp as optimal, or propose a better alternative
      • Provide clear documentation of the chosen approach and its rationale
      • Consider whether the assert can be safely re-enabled with modifications

            Assignee:
            [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            Mariam Mojid
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: