forked from segmentio/kafka-go
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ReadBatchWith bug fix and new MaxWaitTime option (segmentio#482)
This fixes a bug where ReadBatchWith could incorrectly return `io.EOF` in certain `errShortRead` scenarios. Since `io.EOF` means the batch was handled correctly, this could cause consumers to continue to use a connection that is in a bad state. This also adds a MaxWait option that can be used to improve the way that the conn deadline and the fetch request interact. Instead of trying to calculate a correct timeout and change the max wait time, this allows the caller to explicitly configure both the wait and the deadline independently of one another.
- Loading branch information
Steve van Loben Sels
authored
Aug 13, 2020
1 parent
b283236
commit 0dd85d9
Showing
2 changed files
with
76 additions
and
4 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