-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Cursors, Layered Tables
-
None
-
Storage Engines - Foundations
-
23.973
-
None
-
None
Today, when the ingest and stable cursors land on opposite sides of the search key, __clayered_search_near_choose_closest() realigns the ingest cursor to the stable cursor's side (via __clayered_search_near_move_ingest_to_opposite_side), so the merged result always follows stable's side rather than returning the globally-closest key or always preferring the larger key. Introduced by WT-16955 ("Fix the layered search near logic").
Investigate whether the opposite-side move can be removed in favor of a simpler rule (e.g. always choose the closest or always the larger key). Must: (a) determine what regression WT-16955 fixed and whether the simpler rule reintroduces it; (b) confirm consistency with non-layered search_near nearest-key semantics and with subsequent next/prev iteration; (c) add targeted straddle-case tests. Behavior change only - the code-structure refactor and comment fix already landed.