-
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
fix: fill in the Fetch{Request,Response} protocol #1582
Conversation
Note: I know it'd be good to add some more testcases around this, I plan to do those in a follow-up PR |
In order to consume zstd-compressed records the consumer needs to send and receive version 10 FetchRequest/FetchResponses, but they need to do so in a well-formed manner that adheres to the encoding format. Ref: https://kafka.apache.org/protocol Signed-off-by: Dominic Evans <dominic.evans@uk.ibm.com>
I think there is already some testing framework regarding compression algorithms, see 864d473 I have added your commit to my PR so I can run those tests. On my local tests your patch worked great! |
@d1egoaz yeah I just meant extending the basic encode+decode roundtripping tests across all the available protocol versions and checking the output contains the expected fields as you increase the version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@d1egoaz I agree that we should ideally be consistent and I would potentially submit a follow-up PR to make the change across the board — (although my preference would be to just switch to using the ApiVersions call to enable/disable behaviour based on the broker's advertised supported function rather than guessing based on the local config setting) In terms of change-in-behaviour, I think the new behaviour is slightly better and no worse:
I'd actually be tempted to make the default fallthrough return |
@d1egoaz yeah I'm happy for this to be merged. I'm not a committer myself so I can't actually perform the merge 😀 |
Huh, I thought you were a committer :D |
thanks for the contribution @dnwe |
In order to consume zstd-compressed records the consumer needs to send
and receive version 10 FetchRequest/FetchResponses, but they need to do
so in a well-formed manner that adheres to the encoding format.
Ref: https://kafka.apache.org/protocol
Signed-off-by: Dominic Evans dominic.evans@uk.ibm.com