Commit Graph
2 Commits
Author SHA1 Message Date
lukaszraczylo 807cc6ee75 fix(redis): flush in-flight counts from the refresh loop
begin and end now add to a local accumulator. The refresh loop sends
all deltas in one incrMulti before each read, so a request starts no
goroutine and makes no store call. A failed flush keeps the deltas.
Deltas for epochs outside the read window are discarded.

Breaker failures use the same path. The instance whose flush takes a
count from below the threshold to at or above it opens the breaker.
The loop does not idle-stop with pending deltas and flushes on Close.
2026-11-26 03:22:50 +00:00
lukaszraczylo 590a23750b feat(redis): shared breaker and in-flight primitives
Add sharedStateLoop, sharedBreaker and sharedInflight. One loop per
gateway refreshes every primitive from the store once per second, so
request paths read local copies only. A store error keeps the last
values, and three failed refreshes make shared values absent.

Add the redis.sharedState switch. It defaults off, and it needs
redis.address. With it off, no shared keys are read or written.
2026-11-26 03:15:12 +00:00