Skip to content

Late metrics from a removed cluster contaminate a same-ID replacement #1828

Closed

Description

@FlorentinDUBOIS

RemoveCluster establishes a cleanup boundary by deleting rows and dropping late emissions. AddCluster says it re-enables fresh emissions but clears the only tombstone while old sessions may still drain. An old-incarnation event then creates the new row. The no-row oracle is valid before any fresh-incarnation event because AddCluster itself creates no row.

Evidence: runtime-confirmed focused unit plus source. Candidate command exited 101: 1 run, 0 passed, 1 failed, 1560 filtered; the retired cluster event recreated the row after same-ID add.

Rows are keyed by cluster/backend text only and no session metric carries a generation. Treating the same string as continuous identity would contradict the explicit remove cleanup and fresh-emission wording. Backend-only resurrection is separately documented and should not be reported as a second defect here.

Acceptance criteria: Define and enforce the cluster-incarnation boundary for metrics emitted by draining sessions. Cover removal, re-add of the same textual ID, a late retired event before any fresh event, and subsequent fresh emissions.

Source checked at bd19a78e2831fa9b3bc099eff96359f1bd457958 on 2026-10-03:

Runtime evidence, where stated, was collected on 8ed38435c6e80dc374de421116d8b145f1e5ce6a; the reviewed mechanisms remain unchanged at the source revision above. Audit regression tests are prepared locally and are not yet published on main.

Activity

  1. FlorentinDUBOIS commented on Oct 3, 2026

    @FlorentinDUBOIS
    CollaboratorAuthor

    The draft #1843 now carries two distinct levels of evidence on the frozen bd19a78e2831fa9b3bc099eff96359f1bd457958 base.

    • The LocalDrain sink regression is red for a late emission from the removed incarnation.
    • A real HTTP/1 session is held across RemoveCluster, the same cluster ID is re-added with a distinct backend ID/address, a new-session metric witnesses the replacement, then the old session is closed. The proxy gauge moves 2 -> 1 and the new backend has one 2xx response, but the old backend row remains as connections_per_backend=Some(0). The E2E exits 101 with 619 passed/3 failed in the full run; an independent focused replay also exits 101 with 0/1 and 622 filtered.

    H2, WebSocket, TCP, and reuse of the same backend ID/address remain untested. The draft contains no product fix.

  2. added a commit that references this issue on Oct 4, 2026
    66fbce8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions