-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sarama should implement KIP-320 #2365
Comments
dnwe
added a commit
that referenced
this issue
Nov 14, 2022
In order to receive the LeaderEpoch as part of the metadata response we need to be sending and receiving version 7 of the MetadataRequest+Response protocol. Luckily the first flexible version wasn't until v8 so the changes to achieve this are minimal. Contributes-to: #2365
dnwe
added a commit
that referenced
this issue
Nov 14, 2022
In order to receive the LeaderEpoch as part of the metadata response we need to be sending and receiving version 7 of the MetadataRequest+Response protocol. Luckily the first flexible version wasn't until v8 so the changes to achieve this are minimal. Contributes-to: #2365
dnwe
added a commit
that referenced
this issue
Nov 14, 2022
In order to receive the LeaderEpoch as part of the metadata response we need to be sending and receiving version 7 of the MetadataRequest+Response protocol. Luckily the first flexible version wasn't until v8 so the changes to achieve this are minimal. Contributes-to: #2365
dnwe
added a commit
that referenced
this issue
Nov 14, 2022
Include the consumer's view of the leader in Fetch requests as per KIP-320 Contributes-to: #2365
dnwe
added a commit
that referenced
this issue
Nov 14, 2022
Include the consumer's view of the leader in Fetch requests as per KIP-320 Contributes-to: #2365
Should be fixed now, thanks for reporting |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We've recently found out that Sarama use the Fetch API >= version 11 but always set the leader epoch introduced in KIP-320 to -1. Fetching without a leader epoch could lead to spurious offset out of range errors if the client ends up fetching from a stale leader. With the Fetch API >= 11, this is even worst because the broker accept fetches from followers, even without a leader epoch. The client could get spurious out of range errors if it fetches from a follower by mistake as well.
We highly recommend to get KIP-320 implemented in Sarama in order to strengthen its guarantees.
We are discussing options to mitigate this on the server side as well here: https://issues.apache.org/jira/browse/KAFKA-14255.
Best,
David
The text was updated successfully, but these errors were encountered: