op-batcher: exit process on criticial throttling RPC error#17924
Merged
op-batcher: exit process on criticial throttling RPC error#17924
Conversation
and wire up to fatal error condition for throttling loop
scharissis
approved these changes
Oct 22, 2025
sebastianst
reviewed
Oct 31, 2025
Member
sebastianst
left a comment
There was a problem hiding this comment.
I think there's an easier way (that actually also stops the batcher in tests).
Contributor
|
This pr has been automatically marked as stale and will be closed in 5 days if no updates |
Store closeApp in BatcherService and propagate it through DriverSetup so the driver can access it without a separate parameter. Update BatcherServiceFromCLIConfig/initFromCLIConfig signatures (closeApp moved earlier), remove closeApp arg from NewBatchSubmitter, and guard shutdownOnCriticalError against nil. Update call sites accordingly.
Use context.WithCancelCause and pass its cancel function when creating the batcher so the service can be stopped with a cancel cause. Also expose closeApp in DriverSetup and simplify a test by importing slices and replacing manual loops with slices.Contains. Propagate cancel cause to BatcherService
Co-authored-by: almanax-ai[bot] <174396398+almanax-ai[bot]@users.noreply.github.com>
Replace context.WithCancelCause with context.WithCancel and add a closeAppFn that calls p.FailNow with the cause and cancels the batcher context. Pass closeAppFn into BatcherServiceFromCLIConfig and import fmt so tests fail immediately on critical batcher errors. Use cancelable context and failure hook for batcher Log the failure cause and cancel the batcher context on critical errors
sebastianst
approved these changes
Dec 9, 2025
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.
Confirmed manually that with these changes, the process is exited instead of just stopping the "work" of the batcher only.
Closes #17768