Commit Graph
6 Commits
Author SHA1 Message Date
lukaszraczylo 383d477778 fix(shared-state): rate-limit the loop's store error logs
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.
2026-11-26 04:11:17 +00:00
lukaszraczylo a9468f5d51 fix(shared-state): drop breaker deltas older than the fail window
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.
2026-11-26 04:10:29 +00:00
lukaszraczylo 5cb01e2c4b fix(shared-state): restart the loop when an in-flight request ends
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.
2026-11-26 04:09:07 +00:00
lukaszraczylo 6438a95a76 fix(shared-state): resend an ambiguous in-flight batch at most once
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.
2026-11-26 04:07:43 +00:00
lukaszraczylo 648848e23a fix(shared-state): trip the breaker after a lost incr reply
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.
2026-11-26 04:05:30 +00:00
lukaszraczylo 3833997221 fix(shared-state): reset breaker backoff when a request succeeds
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.
2026-11-26 04:04:21 +00:00