Repository navigation
fix(ingester): reuse workers to bound Prometheus files - #2221
Merged
nuclearcat merged 2 commits intoNov 10, 2026
Merged
Conversation
Keep workers alive across cycles, acknowledge final flushes, and expose the Prometheus file count. Clean up connections, caches, and live-gauge files. Abort on unexpected worker exits so the supervisor restarts with fresh queues and locks. Keep parent progress reads free of worker-owned locks. Preserve graceful group-signal handling and cleanup after parent loss. Since a worker exit now aborts the whole command, a bad file must not raise out of the worker: exceptions while preparing a file or building its instances move that file to failed/ and the worker continues. A spool file that vanishes before its batch is skipped. Only None ends a cycle, so a stray empty batch cannot leave a stale sentinel in the persistent queue. Pipe errors are treated as parent loss only on the control pipe itself. Test repeated cycles, abandoned locks and retry, worker crashes, bad files, shutdown, parent loss, and retained metrics totals. All 105 focused tests pass. Closes kernelci#1695 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
Flush every buffered table together before archiving submissions so killing workers cannot lose records from an already archived file. Cover commit, rollback, archive failure, and sibling crashes with durable process tests. Part of kernelci#1695 Assisted-by: OpenAI Codex Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
nuclearcat
force-pushed
the
fix/1695/persistent-ingester-workers
branch
from
November 7, 2026 20:24
d12c8bd to
2496e13
Compare
Member
Author
alanpeixinho
reviewed
Nov 9, 2026
| for path in json_files[offset : offset + INGEST_FILES_BATCH_SIZE]: | ||
| try: | ||
| size = os.path.getsize(path) | ||
| except OSError: |
Contributor
There was a problem hiding this comment.
might be safer to go with FileNotFoundError, to avoid unrelated OSErrors that could also happen.
alanpeixinho
approved these changes
Nov 9, 2026
alanpeixinho
left a comment
Contributor
There was a problem hiding this comment.
overall working great.
One point of attention: when running locally, i got roughly 0.5x throughput with this version compared to main, so it might be safe to monitor the ingester.
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.

Keep workers alive across cycles, acknowledge final flushes, and expose the Prometheus file count. Clean up connections, caches, and live-gauge files.
Abort on unexpected worker exits so the supervisor restarts with fresh queues and locks. Keep parent progress reads free of worker-owned locks. Preserve graceful group-signal handling and cleanup after parent loss.
Test repeated cycles, abandoned locks and retry, worker crashes, shutdown, parent loss, and retained metrics totals. All 101 focused tests pass.
Closes #1695