-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Layered Tables
-
Storage Engines - Foundations
-
218.324
-
SE Foundations - 2026-08-04, SE Foundations - 2026-08-18
-
5
Readers are allowed to continue across an async step-down. The step-down marks the live stable btrees read-only and outdated while those readers may be mid operation. We should verify that every cursor read path handles this transition correctly, and add tests where coverage is missing.
Cases to check for each operation:
search
- The operation enters before the role flip and performs its lookup after the tree is marked.
- The lookup needs the history store during that window.
- A search that triggers the lazy open of the stable constituent while the marking walk runs.
next / prev
- The cursor is positioned on the stable tree when the role changes and the next operation reopens the constituent onto a checkpoint view. Position is carried over by cursor duplication. Verify no skipped or duplicated keys in both directions.
- A scan that holds its snapshot across the step-down and keeps the old handle pinned. The rest of the scan must stay on a consistent view.
- A scan that straddles the mark mid walk, some keys returned before and some after.
search_near
- Same windows as search.
- Neighbor selection that mixes state read before the mark with state read after it.
- Repositioning after the reopen when the aimed key does not exist in the new view.
history store
- The live shared history store handle is also marked read-only and outdated at step-down. Readers that need older versions during and after the transition must still reach the right history store content.
- A reader whose session has no cached history store cursor and opens one fresh after the mark.
- A reader crossing the transition mid transaction, with history store lookups on both sides of the mark.
General
- A transaction spanning the whole step-down must see consistent results for identical reads before and after the mark.
- An outdated handle kept alive by readers across a later checkpoint pickup, reads through it must stay consistent.
- Cached cursors that reopen after their handle is marked outdated.
Any bugs coming out of this investigation will be filed as separate tickets.
- is related to
-
WT-18333 WT_LAYERED_TABLE_STEP_DOWN_CREATED is read and cleared without atomics — formal data race
-
- Open
-
-
WT-18334 Step-down's btree marking loop races the sweep server on stable dhandle flags
-
- Open
-
-
WT-18335 Lazy stable open on a step-down-created table assumes a follower, turning a search miss into a spurious WT_ROLLBACK
-
- Open
-
-
WT-18336 __clayered_ignore_missing_stable's step-down-timestamp check can hide a genuinely missing stable constituent
-
- Open
-
-
WT-18339 next/prev on a cursor left positioned on the stable table aborts the node after a step-down when the transaction cannot see the positioned key
-
- Open
-
-
WT-18326 Step-down's dhandle marking loop updates flag words without the dhandle lock, racing handle close
-
- Closed
-
-
WT-18317 __clayered_ignore_missing_stable diagnoses an open-time failure with check-time state
-
- Needs Scheduling
-
-
WT-18316 Assert that no transaction spans a step-up or an un-announced step-down
-
- Closed
-
- related to
-
WT-18335 Lazy stable open on a step-down-created table assumes a follower, turning a search miss into a spurious WT_ROLLBACK
-
- Open
-