-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Storage Engines - Transactions
-
2,559.084
-
None
-
5
Background
is_prepared_fast_truncate is currently passed as false with FIXME markers in __wti_rec_row_int, __wti_rec_col_int, and __wt_cell_pack_internal_key_addr. The flag needs to be computed at the reconciliation level before page_del state can change, and the decision of whether and how to write a prepared fast-truncate cell must account for the transaction's current state relative to rec_pinned_stable_ts.
Work
Replace the false/FIXME placeholders with the correct is_prepared_fast_truncate computation in __wti_rec_row_int and __wti_rec_col_int, and implement the following selection logic for WT_PAGE_DELETED records:
Rollback case (page_del was prepared and subsequently aborted):
If rollback_ts <= rec_pinned_stable_ts: do not write the page del
Else if prepare_ts <= rec_pinned_stable_ts: write as prepared
Otherwise: do not write the page del
Commit case (page_del was prepared and subsequently committed):
If durable_ts <= rec_pinned_stable_ts: write as committed page del
Else if prepare_ts <= rec_pinned_stable_ts: write as prepared
Otherwise: do not write the page del
Prepare case (page_del is still in-flight prepared):
If prepare_ts <= rec_pinned_stable_ts: write as prepared
Otherwise: do not write the page del
Acceptance Criteria
No FIXME placeholders remain in the fast-truncate cell-building path
The three cases above are covered with tests
Existing prepare and fast-truncate tests pass with no regression