-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Checkpoints
-
None
-
Storage Engines - Persistence
-
SE Persistence backlog
-
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:
- Page is marked with WT_BLOCK_INVALID_PAGE_ID
- Entire delta chain is discarded from storage
- Next reconciliation writes full page image with new page_id
- 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