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
keepalive: a ping that missed and re-wrote the cache does not restart the ttl_expiry clock #580
A keep-alive ping that missed the cache does not move the entry's refresh time. The next miss can then get the verdict ttl_expiry (the cache lifetime ran out) when the cache was in fact re-created by that ping. Found by Osher in the review of #546 (finding 4).
What we found
proxy/keepalive.go:1538 and :1776 move the refresh time only for a ping that read the cache (CacheRead > 0).
A ping that missed also wrote the entry again, so the cache lifetime started again at that ping.
The next request that misses is then judged against the older refresh time, and the dashboard shows ttl_expiry.
This is rare at the default 270 s idle setting.
Proposal
Move the refresh time for a ping that wrote the cache (CacheWrite > 0) as well as one that read it.
Add a test: a ping that misses and writes, then a request after the lifetime from the first request but within the lifetime from the ping. The verdict must not be ttl_expiry.
Activity