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
channels SWR follow-ups to #517: recover in background refresh, honour cache reset #519
Follow-ups from the #517 review ("Review — CS-pve-agent1 PR#517"). Fix these before the next release:
Recover in the background refresh (must fix). The stale-while-revalidate goroutine runs query() without recover. A panic in the query kills the whole server process instead of failing one request; the HTTP handler only recovers on the synchronous path. Add a recover that logs, keeps the stale entry and lets a later retry run. Add a test with a panicking query that proves the process survives and the stale entry is still served.
Honour reset() (nit). A refresh started before a cache reset, for example from the decode backfill, can finish afterwards and put its pre-reset result. Add a generation or epoch check so a refresh that started before a reset does not store its result. Test it.
Optional (info): re-check for a fresh entry before the background query, as the synchronous flight does.
Keep the #499 correctness tests and the #495 lock rule.
Fixed by #520 (merged as d18ffd2cc50b626628d3f32695b5ba59806a70d6).Fixed by #520: the channels SWR background refresh recovers from panics (the process survives and the stale entry is still served), and a refresh started before a cache reset no longer stores its result. APPROVE, CI green.
Activity
dborup commentedon Oct 21, 2026
Fixed by #520 (merged as
d18ffd2cc50b626628d3f32695b5ba59806a70d6).Fixed by #520: the channels SWR background refresh recovers from panics (the process survives and the stale entry is still served), and a refresh started before a cache reset no longer stores its result. APPROVE, CI green.