Repository navigation
fix(zipper): keep lookups not-found when a store refuses in every replica group - #597
Merged
Merged
Conversation
added 2 commits
November 13, 2026 16:52
…lica group A find that matches nothing returned HTTP 422, and an info HTTP 500, when one store refused connections in every replica group of a cluster, for example after stopping the retired stores of a resized cluster. A refusal counted as not-found only when another replica group of the cluster answered not-found from every member, and no group could. Treat a cluster's connect failures (refused, reset, dial timeout) as not-found when every reachable store of the cluster answered not-found and no member failed in any other way. An unreachable cluster, a server error or a timeout after the store accepted the request still fail the lookup, and ungrouped backends still never recover each other. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
golangci-lint (unparam) failed CI on master: every caller passed "dc2". Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
A
/metrics/findthat matches nothing returned HTTP 422 (all backends failed with mixed errors: ... connection refused:1 ... No matches found:N), and/infoHTTP 500, whenever one store refused connections in every replica group of a cluster. That happens when the retired stores of a resized cluster are stopped while they are still listed in the zipper config: each replica group then has one refusing member and the rest answer not-found. Dashboards showed an error instead of "no data". Renders were not affected.The previous rule recovered a refusal only when another replica group of the same cluster answered not-found from every member, so no group could vouch once each group had a stopped store.
Architecture
lookupGroupErrors(find and info fan-in) now asks one question per cluster,clusterReachableNotFound:connectFailure: refused, reset or dial timeout before any response).When all three hold, the cluster's connect failures become the lookup's not-found error, so
errorsFanInreports not-found. This replaces the stricter "another group answered in full" check, which the new rule covers.Still failing, unchanged:
Before / after
[][]Validation
TestFindInfoRefusedStoreNotFound: 15 cases through both handlers. On master the newrefused_in_every_group,refused_in_every_group_dial_timeoutandone_group_cluster_member_refusedcases fail with find 422; with the change all 15 pass, and the 8 must-fail cases still return 422/500.go test -race ./pkg/backend/... ./pkg/app/carbonapi/...andgo veton both packages pass;golangci-lintv2.14.0 (the CI version) reports 0 issues.Controlled test on a production frontend: a side instance with the real three replica groups of one cluster (2 stores each) plus one refusing member (
127.0.0.1:1/2/3) in every group, queries that match nothing:x.*a.b.….prefix*[][]Single-host canary on that frontend (drained restart, about 5 minutes of real traffic, compared with a peer on master): find 39× 200 / 0× 422 (peer 33 / 0), render 1,990 / 0 5xx (peer 1,986 / 0), partial-fail share 28% vs 29%, no panics. Five find/info queries returned byte-identical bodies on the canary and the peer. The host is back on master.
The second commit drops a constant parameter of a test helper that golangci-lint (
unparam) flags on master, so CI passes.🤖 Generated with Claude Code