ExportXMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Transactions
    • None
    • Storage Engines - Transactions
    • 285.853
    • SE Transactions - 2026-12-04
    • 3

      Issue Summary

      The layered cursor's positioned-advance path (__clayered_advance_positioned and the helpers it calls in src/cursor/cur_layered.c) now handles prepared conflicts on either constituent: redriving a blocked current cursor, redriving a blocked alternate, breaking a tie after a redrive, and reversing out of a stall. These cases are interleaved with the ordinary positioning logic, and the conditions that decide which one applies are hard to read.

      Context

      • Reviewer feedback on the pull request for WT-18717 asked for the prepare-conflict cases to move into their own function, for a smaller _clayered_advance_positioned that first redrives whichever constituent is blocked, and for an explicit indication of where a WT_PREPARE_CONFLICT came from (fresh start, repositioning the alternate, redriving a blocked cursor) instead of inferring it from the constituents' state in _clayered_iterate_finish.
      • The behaviour was deliberately left unchanged in that pull request. The logic went through several rounds of correctness fixes there, and the extraction is easier to review against a settled baseline.

      Proposed Solution

      • Move the blocked-walk cases out of __clayered_advance_positioned into a separate function, keeping the behaviour identical.
      • Record where a prepared conflict came from and use that in __clayered_iterate_finish in place of the state-based condition.
      • Keep the existing tests; they pin the behaviour.

      Definition of Done

      • No behaviour change: the layered stepdown and layered cursor Python tests pass unchanged.
      • _clayered_advance_positioned reads as a short dispatch, and _clayered_iterate_finish no longer infers the origin of a conflict from constituent state.

            Assignee:
            [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            Chenhao Qu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: