Repository navigation
fix(sessions): back off history passes when retained ingest is Blocked instead of re-driving a broken store every wake - #4573
Merged
ScriptedAlchemy merged 2 commits intoOct 27, 2026
Conversation
A Blocked outcome (for example projection_store_corrupt, retryable=false upstream) warned and continued, so every wake re-ran a full pass that read the same permanently broken store before failing again — 9,241 worker-hog warnings over two days on one machine, on top of a corrupt 1.6 GB sessions.db re-read at full cadence. History passes now back off exponentially, 1 min doubling to a 1 h cap; the first Blocked outcome logs one error-level event with the reason codes and the retry schedule, later ones a bounded warn. Any pass that makes progress resets the backoff. Projections keep their cadence. Scheduler half of ScriptedAlchemy#4569; the relational-store rebuild protocol stays tracked there.
|
A pass where one provider advances while another stays blocked reports
Blocked { made_progress: true }; resetting the backoff on progress let
the blocked store be re-read at full wake cadence again. The backoff
now clears only on an outcome with no blocker.
Contributor
Author
|
Addressed in the follow-up commit: a |
ScriptedAlchemy
merged commit Oct 27, 2026
96fe61b
into
ScriptedAlchemy:master
17 of 19 checks passed
This was referenced Oct 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scheduler half of #4569. Related: #4481 (the
registry.rsworker-hog load), #4564, #4567.Problem
run_session_temporal_refresh_schedulertreated aBlockedhistorical-ingest outcome as warn-and-continue.Blockedis terminal per host (e.g.projection_store_corrupt,retryable=falseupstream), so every wake re-ran a full pass that read the same permanently broken store before failing identically.Measured on one machine over two days, against a corrupt 1.6 GB
sessions.db:retained historical session ingest is blocked reason_code="claude:projection_store_corrupt,cursor:projection_store_corrupt"(plus 68× each across four host catch-up paths)native task held its worker for one poll past 100msfromregistry.rsspawn sites — the re-driven passes are the CPU costChange
Blocked: 1 min doubling, capped at 1 h. Projections keep their cadence; only the history pass is suppressed.Blockedoutcome logs oneerror-level event with the reason codes and the retry schedule; subsequent ones log a bounded warn with the attempt number.The relational-store rebuild protocol (the real fix for a corrupt
sessions.db) stays tracked in #4569 — this PR removes the unbounded re-drive cost, not the corruption.Tests
tracedecay-session-runtimescheduler tests: 49/49 green (--features tracedecay-rusqlite-runtime/test-runtime; without the feature these tests fail on cleanmastertoo — cargo harness lacks the process runtime, CI runs the Bazel targets).cargo checkclean.