You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit fcc660d
Browse filesBrowse the repository at this point in the historyBrowse files
ring: count each key once when it reaches quorum in DoBatch (#7975)
* ring: count a key once when DoBatch reaches its quorum
batchTracker.record decremented rpcsPending on every success at or past
a key's quorum. With RF 3 a fully replicated key counted twice, so in
rare cases DoBatch returned success before every key reached quorum,
and an error from a key that failed on all its replicas was not
returned.
Count a key only on the success that reaches its quorum, as dskit does
(grafana/dskit#430). Successes past quorum still skip the
remaining-instances check. Require at least one success per key, so a
replication set with MaxErrors >= len(Instances) cannot leave the key
uncounted.
Signed-off-by: Alan Protasio <alanprot@gmail.com>
* ring: test DoBatch quorum accounting
Scripted tests fix the order in which DoBatch records each instance's
outcome: fully replicated keys next to keys that miss quorum (4xx and
5xx, several orders), keys at exactly quorum, error family selection,
a replica filtered out, MaxErrors 0 and MaxErrors >= len(Instances),
failed RPCs counting for every key in them, and outcomes recorded after
the context is canceled.
TestDoBatch_EveryCompletionOrder checks every result and completion
order over small layouts. Randomized tests, one over a real ring, check
concurrent completion against the quorum of each key, and that DoBatch
never answers success before every key has quorum among the RPCs that
have returned.
Signed-off-by: Alan Protasio <alanprot@gmail.com>
* distributor: test Push when series are rejected by their ingesters
Push fails when a series is rejected by all its ingesters while the
other series replicate fully. mockIngester can now reject chosen series
the way a real ingester does: store the others and fail the whole RPC
with 400. Tests pin how such a failure counts against every series in
the RPC.
Signed-off-by: Alan Protasio <alanprot@gmail.com>
* CHANGELOG: DoBatch quorum fix
Signed-off-by: Alan Protasio <alanprot@gmail.com>
* CHANGELOG: add PR number for the DoBatch quorum fix
Signed-off-by: Alan Protasio <alanprot@gmail.com>
---------
Signed-off-by: Alan Protasio <alanprot@gmail.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,6 +40,7 @@
40
40
*[BUGFIX] Querier: Increment `cortex_query_evictions_total` and deregister the victim before cancelling it in the query evictor, fixing double-counted evictions of still-unwinding queries. #7616
41
41
*[BUGFIX] Ring: Ignore READONLY ingesters when assigning tokens so the active series remain balanced. #7946
42
42
*[BUGFIX] Distributor: Fix a `panic: send on closed channel` crash during shutdown when `-distributor.num-push-workers` or `-distributor.num-query-workers` is greater than 0. #7964
43
+
*[BUGFIX] Ring: Fix `DoBatch` counting a key more than once when more replicas than the quorum succeed, which in rare cases could hide a write error from a key that did not reach quorum. A distributor push now always waits until every series reaches quorum, so it returns the error of a series that misses quorum, and takes as long as its slowest series to reach quorum. #7975
0 commit comments