Skip to content

fix(agent): persist to Redis off the core lock and drain pending writes on stop - #54

Merged
rennf93 merged 2 commits into
masterfrom
fix/agent-persist-off-lock
Oct 15, 2026
Merged

rennf93 merged 2 commits into
masterfrom
fix/agent-persist-off-lock

Conversation

@rennf93

@rennf93 rennf93 commented Oct 15, 2026

Copy link
Copy Markdown
Member

Closes #53

I moved the Redis persist off the core lock into tracked background writes that are drained on stop. In-flight writes are capped at buffer_size (shared by events and metrics); past the cap the record stays in memory only, counts toward redis_persist_failures, and one warning is logged per degradation episode. A write whose record left the buffer before the task started is skipped, and membership is tracked in a key map instead of scanning the buffer.

Persists are capped at buffer_size in flight (shared by events and metrics). Past the cap the record stays in memory only, counts toward redis_persist_failures, and one warning is logged per degradation episode. A write whose record left the buffer before the task started is skipped. Membership is tracked in a key map instead of scanning the buffer.
@github-actions github-actions Bot added area: core Touches the agent lifecycle, config, or models tests Test suite changes labels Oct 15, 2026
@rennf93
rennf93 merged commit 0b49168 into master Oct 15, 2026
11 checks passed
@rennf93
rennf93 deleted the fix/agent-persist-off-lock branch October 15, 2026 04:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: core Touches the agent lifecycle, config, or models tests Test suite changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(agent): Redis persistence blocks event-emitting requests

1 participant