-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Storage Engines - Transactions
-
50.975
-
SE Transactions - 2026-12-18
-
8
Description:
Follow up on the coverage request in PR #15102 by extending deterministic tests for layered cursor iteration and recovery after prepare conflicts. Existing tests cover individual regressions but not the combinations below.
Prefer parameterizing existing tests and reusing their helpers rather than adding a separate file for each combination.
Scope:
- Independent prepared transactions in ingest and stable
Extend test_layered_async_stepdown23.py across both scan directions, either constituent’s prepared key encountered first, either rollback order, and fresh-cursor versus successful-search entry. Use distinct prepared keys. After resolving one transaction, retry while the other remains prepared, then resolve it and verify the remaining results.
- Multiple prepared keys in one transaction
Extend test_layered_prepare01.py and related tests with reverse scans and prepared inserts, updates and removes on adjacent and separated keys. Include prepared updates in the leader’s stable constituent, direction changes while prepares remain unresolved, and applicable mirroring configurations. Preserve commit and rollback coverage where supported; transactions that straddle step-down must remain subject to the existing commit restrictions.
- Shared-key and reversal histories under both mirroring settings
Extend selected cases in test_layered_async_stepdown24.py to run with stepdown_write_mirroringenabled and disabled. Cover repeated retries after a reverse-direction conflict and returning to the original direction, symmetrically for next() and prev(). Adapt data and expected results to account for mirrored writes affecting both constituents.
- Bounds combined with prepare-conflict recovery
Cover exclusive bounds, bounds at missing keys, and simultaneous lower/upper bounds. Combine these with repeated conflict retries, direction changes, exhausted constituents and single-constituent operation. Set bounds before positioning unless explicitly testing rejection on a positioned cursor. Coordinate with WT-19100, which separately tracks the bounds API fixes and their original regressions.
- Search recovery and subsequent same-cursor operations
Add reverse variants of both recovery tests in test_layered_prepare02.py, covering search() and search_near(). On an ordinary follower, test an ingest prepare conflict followed by searching for another key or supported update(), remove(), modify(), reserve() and reset() operations on the same cursor. Verify subsequent iteration against an ordinary non-layered cursor. Keep this distinct from search-after-step-down reopening coverage.
- Fixed read timestamps relative to prepare and commit
Cover readers below, equal to and above the prepare timestamp. Separately, retry the same follower cursor after a prepared transaction commits at or below the reader’s timestamp, or above it, using valid timestamp orderings. Check insert/update/remove visibility through exact keys and values. Keep the read timestamp unchanged throughout each scan; changing timestamps mid-scan under WT-17960 is outside this ticket’s scope.
Acceptance criteria:
- Assert exact ordered key/value sequences and end-of-scan results, detecting omissions, duplicates and stale values.
- Assert expected prepare conflicts explicitly, including retries while a transaction remains unresolved.
- Continue on the same cursor and read transaction without resetting away differences, except when reset is the operation being tested or the documented API contract requires it.
- Repeat new asynchronous/role-change cases to check determinism.
- Document which combinations are covered and explicitly track any remaining exclusions. Report newly exposed behavioral defects separately rather than weakening assertions.