-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Layered Tables
-
None
-
Storage Engines - Foundations
-
113.791
-
None
-
None
The WT_CLAYERED_ITERATE_NEXT/PREV flags were set and cleared in many scattered places across the layered cursor code (before nearly every API method, in update_state, reset_cursors, stable reopen, etc.), making the iteration state hard to reason about and easy to break.
Centralize the handling:
- The flags are cleared in one place during enter(), and set in one place - the top-level next/prev - after a successful or prepare-conflicting walk.
- The per-operation decision of whether the parked alternate constituent is reusable is computed once at enter() into op->alternate_positioned. The iteration machinery works off a bool direction and that field, and no longer touches the flags.
Motivation: stop having to remember to clean up the iteration flags in every code path.