The HELP text claimed the discovery breaker is never shared via Redis.
With redis.sharedState on it is shared, so every replica reports the
same value and max() applies. The golden scrape changes by this line.
Each served request spawned a second async write for the calibrator
counters. They now ride the batch accountWith already sends, and only
when shared state is on and a store is configured.
A Redis outage logged one line per refresh and per failed write. The
loop now logs at most one store error per 30 seconds, the interval the
limiter already uses.
During a Redis outage the queued failure deltas kept a replaced
gateway's loop alive for ever. A queued failure older than the fail
window cannot change the fleet count, so the breaker now drops it.
A request that outlived the idle window ended after the loop had
stopped. Its finish delta then stayed queued with no loop to send it.
The end function now touches the loop.
A flush whose reply timed out may have landed in Redis. The flusher
kept the batch and resent it every tick, which counted it many times.
A batch that never reached the wire is still kept. A batch that may
have landed is resent once and then dropped.
A flush whose INCR Redis applied but whose reply failed was resent.
The resend never crossed the threshold, so the fleet never tripped.
The flush now trips when the count is at or above the threshold and the
last refresh shows the breaker closed. A short reply is now an error.
The open count only grew, so each trip after a recovery waited longer
than the last. The breaker now reads the open count on every refresh.
A success sets the count to zero when the last refresh showed it above
zero. The next trip then opens for the base duration.