-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Critical - P2
-
Affects Version/s: None
-
Component/s: Cursors, Layered Tables, Transactions
-
Storage Engines - Foundations
-
266.309
-
None
-
8
Summary
A positioned layered cursor on a disaggregated follower can return stale data after a write through another cursor in the same transaction. This violates read-your-own-writes.
Impact
- remove(): iteration returns the deleted key.
- update() / insert() / modify(): iteration returns the old value or skips the new key.
- Range truncate: iteration returns a key deleted by the same transaction.
- Both next() and prev() affected. No on-disk corruption observed.
Root cause
__clayered_update_state() invalidates cached iteration state on snapshot or read-timestamp changes. Writes through another cursor in the same transaction change neither, so WTI_CLAYERED_ITERATE_NEXT/PREV reuse a stale alternate position.
Reproducer
See attached test_layered_cursor29.py. Minimal case: three keys, follower cursor A parked on key 550, cursor B removes 550 in the same transaction – A.prev() returns 550.
- is related to
-
WT-17841 Disaggregated follower loses a key re-inserted inside a previously truncated range
-
- In Code Review
-