op-batcher: exit forcefully instead of "stopping", when throttle endpoint unavailable#17909
Closed
op-batcher: exit forcefully instead of "stopping", when throttle endpoint unavailable#17909
Conversation
Contributor
Author
|
I think to do this properly we need to have the throttling goroutine signal to the main process that it needs to shutdown. |
sebastianst
reviewed
Oct 17, 2025
Comment on lines
-632
to
+633
| ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) | ||
| defer cancel() | ||
| // Call StopBatchSubmitting in another goroutine to avoid deadlock. | ||
| go func() { | ||
| _ = l.StopBatchSubmitting(ctx) | ||
| }() | ||
| os.Exit(1) //nolint:gocritic // this is a shutdown error |
Member
There was a problem hiding this comment.
I don't think this is a viable solution. In general, we only want the batcher main to shutdown. But e.g. if the BatchSubmitter is used in a test environment, we surely don't want to kill the whole process.
I think we just need to fix how a stopped batch submitter shuts down, e.g. that all the goroutines that were started stop and the main routines properly returns.
Contributor
Author
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.
No description provided.