Fix parallel catchup v2 false alarm on empty queues with running workers#366
Merged
marta-lokhova merged 2 commits intomainfrom Mar 20, 2026
Merged
Fix parallel catchup v2 false alarm on empty queues with running workers#366marta-lokhova merged 2 commits intomainfrom
marta-lokhova merged 2 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes a false-alarm failure mode in parallel catchup v2 where the orchestrator aborted when Redis queues were empty but some workers were still running/reachable intermittently. It shifts completion criteria to Redis queue state and improves “stuck job” detection by tracking job ownership in Redis.
Changes:
- Add a Redis hash (
job_owners) and wire it through Helm config to workers and the job monitor. - Workers record job ownership on claim and delete ownership in the completion transaction.
- Job monitor pings only workers that own in-progress jobs and adds retry confirmation before retrying stuck jobs; orchestrator no longer gates completion on worker liveness.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/MissionParallelCatchup/parallel_catchup_helm/values.yaml | Adds job_owners Redis key to chart values. |
| src/MissionParallelCatchup/parallel_catchup_helm/templates/job_monitor.yaml | Passes JOB_OWNERS env var to job monitor. |
| src/MissionParallelCatchup/parallel_catchup_helm/templates/catchup_workers.yaml | Passes JOB_OWNERS env var to workers. |
| src/MissionParallelCatchup/parallel_catchup_helm/files/worker.sh | Writes/clears job ownership in Redis for each claimed job. |
| src/MissionParallelCatchup/job_monitor.py | Uses ownership map to limit pings and adds multi-retry confirmation before retrying in-progress jobs. |
| src/FSLibrary/MissionHistoryPubnetParallelCatchupV2.fs | Removes “all workers must be down” completion assertion; completes based on queue state. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
jacekn
approved these changes
Mar 20, 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.
Summary
Fixes the false alarm where the mission aborts with "No jobs left but some workers are still running" even when all jobs completed successfully (#243)
the completion transaction
death with 3 retries (30s gaps) before retrying stuck jobs
completion