feat(pipeline): cancel dispatch on collector persistence failure - #604
Merged
Conversation
|
Unsigned commits detected! Please sign your commits. For instructions on how to set up GPG/SSH signing and verify your commits, please see GitHub Documentation. |
When the result collector encounters a write error, it now signals the executor to cancel dispatch immediately. This prevents wasting inference work after durable persistence has already failed. The executor owns a split context: source and dispatcher receive dispatchCtx (cancelled on persistence failure), while the collector continues draining resultCh until close to avoid deadlocking senders. Closes #595 Signed-off-by: Jooyeon Mok <jmok@redhat.com>
j-mok-dev
force-pushed
the
feat-595-dispatch-cancel-on-failure
branch
from
July 17, 2026 18:00
1719dbc to
fda05df
Compare
lioraron
approved these changes
Jul 17, 2026
Signed-off-by: Jooyeon Mok <jmok@redhat.com>
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.
Why is this PR needed?
When the collector encounters a persistence failure (disk write error), dispatch and inference work continue until all requests complete — wasting resources on results that can never be durably recorded. (#595)
What does this PR do?
Introduces a split-context pattern in the pipeline executor:
dispatchCtx(child of errgroup ctx) → passed to source and dispatcherOn the first write error, the collector invokes a
sync.OnceFunccallback that cancelsdispatchCtx. The existing PreDispatcher/AIMD cancel-drain path stops new work immediately. The collector continues drainingresultChuntil close to avoid deadlocking senders, then returns the persistence error.No changes to the collector's drain-until-close contract, worker error routing, cancel code logic, or async dispatcher cancel/drain flow.
How was this tested?
make testpasses)losing original custom_id on cancel). Fixed in fix(source): preserve original custom_id on cancellation #601, unrelated to
this change.
Checklist
git commit -s) per DCOmake pre-commit)make test)make test-e2e) — blocked on fix(source): preserve original custom_id on cancellation #601 mergeRelated Issues
Closes #595