__clayered_ignore_missing_stable diagnoses an open-time failure with check-time state

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Layered Tables
    • None
    • Storage Engines - Foundations
    • 55.811
    • None
    • None

      __clayered_ignore_missing_stable handles the race between opening a stable table and reconfigure(role="follower"): an operation that dispatched as a leader can find the stable constituent missing because the table was created while the step-down timestamp was set and never had one. The check explains the failure by reading the current step-down timestamp and role — but the failure evidence is from open time, the explanation is from check time, and nothing ties the two moments together:

      t1  ANOTHER BUG (required precondition): table T's live stable constituent is
          lost on a healthy leader — corruption, out-of-band deletion, a defect
          like WT-18336's trigger
      t2  op on T dispatches role=LEADER; the stable open fails with ENOENT
          -- thread suspends --
      t3  a step-down is announced and/or completes
      t4  thread resumes: the checker reads the CURRENT state (timestamp set /
          role changed) -> tolerates the failure -> the pre-existing anomaly is
          masked as "empty stable"; reads proceed ingest-only, stable content
          silently absent
      

      This is not urgent: the whole scenario hinges on t1 — another defect must remove the stable constituent first (the same precondition as WT-18336) — plus a step-down landing inside the t2–t4 window.

      A direction to consider: capture the timestamp and role before attempting the open and diagnose the failure against the captured values.

      Related cleanup in the caller __clayered_open_stable_first(): stable_checkpoint_meta_lsn = conn_lsn and the layered_curs_open_stable statistic run even when the open legitimately leaves no stable cursor; they should probably run only when the stable table was found.

            Assignee:
            [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            Ivan Kochin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: