-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: make fetchInitialOffset use correct protocol
The `fetchInitialOffset` func in offsetManager was hardcoded to send a Version 1 OffsetFetchRequest rather than sending the appropriate version based on the config KafkaVersion. As discussed in #2694 this meant that LeaderEpoch was always being decoded as the default value '0' (because it was only returned in Version >= 5 OffsetFetchRequest). However, other areas of the offsetManager code were sending the newer protocol versions, so for example the OffsetCommitRequest would include a leader epoch value of 0 rather than an accurate one. Correct this bug by sending the correct protocol version in fetchInitialOffset and also ensure we default to `-1` when we decode an OffsetFetchResponse of a Version < 5 Fixes #2694 Signed-off-by: Dominic Evans <dominic.evans@uk.ibm.com>
- Loading branch information
Showing
5 changed files
with
45 additions
and
37 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
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