Repository navigation
Conversation
Every change persists the whole coordinator snapshot, and the store refuses a snapshot over 4 MiB. Nothing finished was ever dropped from it, so a long-lived service reached the bound (3,073 exited processes and 585 runs after about a day), the next commit failed, and the loop stopped for good: every later call returned "coordinator loop is closed". - Keep at most 128 finished runs (with their activities and attempts) and 256 exited processes, oldest dropped first. Records still in use are always kept: live processes, records an open FlowRun's tasks refer to, attempts with a pending approval or tool request, and the change's own. - A commit still over the bound drops every finished record and retries once. - When a change truly cannot be persisted, log why, and answer later calls with the persistence error instead of "coordinator loop is closed".
The coordinator keeps its snapshot under the journal bound, so a long-running service no longer stops with "coordinator loop is closed". Release notes in docs/releases/0.3.5.md.
This branch has not been deployed
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.
Problem
The coordinator persists its whole snapshot on every change, and the journal refuses a snapshot over 4 MiB (
MAX_SNAPSHOT_BYTES). Nothing finished was ever dropped from the snapshot. A Desktop Supervisor service that had run for about a day held 3,073 exited processes and 585 runs, a 4.19 MB snapshot. The next commit was refused,persistence_failedwas set, and the loop stopped for good: every later call returnedcoordinator loop is closed. Restarting would not have helped for long, because the snapshot only grew.Fix
prune_retained, run on every change): keep at most 128 finished runs, each with its activities and attempts, and 256 exited processes; the oldest are dropped first. Records still in use are always kept: live processes, records an open FlowRun's tasks refer to, attempts with a pending approval or tool request, and the records of the change being persisted. A run restored asUnknownwith no live process counts as finished.coordinator persistence failed; reopen the service to recoverinstead ofcoordinator loop is closed.docs/releases/0.3.5.md. Lockfiles change only this repo's own packages.Validation
cargo fmt --all -- --check,cargo clippy --all-targets -- -D warnings: clean.cargo test --all-targets -- --test-threads=1: 135 library tests pass, plus the integration tests.Closed.Cargo.lockpassescargo metadata --locked.