ExportXMLWordPrintableJSON

    • Storage Engines - Foundations
    • 266.305
    • 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.

            Assignee:
            Yury Ershov
            Reporter:
            Jie Chen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: