-
-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
producer: allow a canceled context & aborting to quit unknown wait
Unknown topic waiting was missing two areas to "quit" that existed _after_ a topic was loaded (and no longer unknown). Aborting or a canceled record context would not quit waiting. We now quit on both. For aborting, we add a new channel to the unknown type for must-quit errors. Previously, all errors being sent to unknown.wait would be retriable (either retriable kerr's, or retriable client connection failures). We do not want to send our must-quit signal to the unknown.wait channel because *theoretically* it could be fully buffered and thus either we would have to (a) wait to send, which has problems if the wait loop quits, or (b) select/default, which would drop our must-quit error. We now use a size-1 channel that, if ever received from, always quits the loop. As well, for a ctx-canceled record, similar to batches, we use the first record's context. Closes #158.
- Loading branch information
Showing
3 changed files
with
37 additions
and
7 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
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
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