forked from privacypass/challenge-bypass-server
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The current code closes the batchPipeline channel when it receive transient errors to restart the readers. But this does not close Kafka readers so they continue to read. When this happens, a message will be written to a closed channel triggering panic in processMessagesIntoBatchPipeline. As that does not use recover, this will crash the whole process. This change refactors error handling to ensure that the errors are properly propagated to the caller while also supporting context cancellation which allowed to provide extended test coverage. Kafka readers/writers are always closed on errors. This change still uses an explicit exit on errors and lets the container runtime to restart the process. CLOSE #706
- Loading branch information
Showing
3 changed files
with
320 additions
and
58 deletions.
There are no files selected for viewing
This file contains 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
Oops, something went wrong.