-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Layered Tables
-
None
-
Storage Engines - Transactions
-
912.685
-
None
-
8
Summary
Investigate how prepared transactions can be supported in async step-down (the step_down_timestamp mechanism on disaggregated storage). Prepared transactions were excluded from the core implementation (WT-17895) and are out of scope for the public preview. This ticket identifies the gap and the mechanism options; a follow-up ticket will implement the chosen approach.
Problem
Async step-down resolves straddler transactions (begun before the step-down timestamp is set, committing after it) with a detect-and-rollback strategy: commit returns WT_ROLLBACK and the application retries into the ingest table. A prepared transaction cannot be rolled back, so this strategy does not work for it. Example:
session->begin_transaction()
Perform updates.
Acquire the oplog mutex and obtain a prepare timestamp.
session->prepare_transaction("prepare_timestamp=10")
Acquire the oplog mutex and set stepdownTs = 11.
Acquire the oplog mutex again and obtain a durable timestamp.
session->commit_transaction("durable_timestamp=12")
This straddler is prepared before stepdownTs but commits after it. Its updates already reside in the stable tree (whereas they should have been on ingest), but its commit timestamp (12) is greater than stepdownTs (11), so it can be neither rolled back nor safely committed.
Current behavior and scope of investigation
- The code blocks this case with assertions that abort the process (__wt_txn_prepare in src/txn/txn.c and __session_commit_transaction in src/session/session_api.c). The prepare-time check does not catch the sequence above, so the commit-time check fires and fails the system.
- Prepared transactions need a different mechanism than detect-and-rollback. Evaluate the possible directions: blocking prepare while a step-down is pending, moving the prepared updates to the ingest table at commit, or committing at or below the step-down timestamp.
- is depended on by
-
WT-18723 Remove the temporary step-down/prepare feature flag once WT-18422 lands
-
- Open
-
- is related to
-
WT-18782 Step-up does not check for transactions holding a follower truncate
-
- Closed
-
-
WT-17895 Core Async Stepdown Implementation
-
- Closed
-
-
WT-18234 Async step-down: rely on transaction write-conflict detection, not the step-down mutex
-
- Closed
-
-
WT-18722 Add a temporary feature flag to enable prepared transactions during an async step-down, for testing the layered-iteration prepare-block fix
-
- Closed
-
- related to
-
WT-18717 Layered cursor iteration assumes only the ingest cursor can be prepare-blocked, which prepared updates on the stable table violate
-
- In Code Review
-
-
WT-18526 PT: Handle a prepared truncate straddling the async step-down boundary
-
- Open
-
-
WT-18723 Remove the temporary step-down/prepare feature flag once WT-18422 lands
-
- Open
-
-
WT-18722 Add a temporary feature flag to enable prepared transactions during an async step-down, for testing the layered-iteration prepare-block fix
-
- Closed
-