Skip to content

tier1: refresh last_used markers during long-running requests - #1070

Merged
maoueh merged 3 commits into
streamingfast:developfrom
aggris2:fix/refresh-last-used
Nov 19, 2026
Merged

maoueh merged 3 commits into
streamingfast:developfrom
aggris2:fix/refresh-last-used

Conversation

@aggris2

@aggris2 aggris2 commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

last_used is written once at request start, so a stream that stays connected longer than the purge retention looks idle and its caches can be purged while in use.
Rewrite the markers every 6h for the lifetime of the request (WithLastUsedRefreshInterval, <= 0 disables).
Write every module's marker even if one fails, and give the package and marker writes separate timeouts.

- Default the refresh interval to 1h.
- Defer the package write timeout cancel.
- Skip a refresh tick once the request context is done.
- Run TestEvery under testing/synctest.
- Add changelog entry.
@maoueh
maoueh merged commit 015c5bc into streamingfast:develop Nov 19, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants