Commit Graph
2 Commits
Author SHA1 Message Date
lukaszraczylo b6ddf3d7c8 refactor(shared-state): drop the unused local arm of sharedBreaker
Every caller keeps its own local breaker and reads only sharedOpen, so the
local arm in sharedBreaker (isOpen, recordFailureLocal, breakerLocal) was
reached only by tests.
A per-id failure count since the last success replaces it, because
recordSuccess still needs it to decide whether a fleet reset write is due.
Tests now read sharedOpen. A failover test pins that the caller's local
breaker still opens while the store is down.
2026-11-26 07:48:05 +00:00
lukaszraczylo a46058694b feat(failover): share the request breaker through Redis
The request breaker now also reads and writes the fleet breaker when redis.sharedState is on. A pod that sees enough failures opens the breaker for every pod after one refresh. A success on any pod closes it again. With the switch off, the tracker runs its local code only and makes no store call.
2026-11-26 03:26:39 +00:00