Skip to content
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

fetch size overflow #1376

Merged
merged 2 commits into from
Jul 2, 2019
Merged

Conversation

andrewhao888
Copy link
Contributor

When getting a partial trailing message, consumer's fetch size will double.
However, it is possible to reach max int32, then a kafka broker receives a fetch request with negative fetch size.
Looks like this issue has been checked by Kafka itself with ticket: https://issues.apache.org/jira/browse/KAFKA-7656

Otherwise, we should provide a reasonable default Fetch.Max value

@ghost ghost added the cla-needed label May 21, 2019
consumer.go Outdated Show resolved Hide resolved
@varun06
Copy link
Contributor

varun06 commented Jun 25, 2019

Looks good to me, Do you want to sign CLA and add a test too.

@andrewhao888 andrewhao888 force-pushed the m_consumer_fetch_size_overflow branch from 25f71e5 to fa8b9f4 Compare June 27, 2019 02:57
@andrewhao888
Copy link
Contributor Author

Yes, let me add a test case, as well as CLA

@ghost ghost removed the cla-needed label Jul 2, 2019
@andrewhao888
Copy link
Contributor Author

sorry @varun06, it is too hard to provide a valid test case without mock broker update. A PartialTrailingRecord will lose trailing record after encoding. I just push a test case in fetch_response_test.go and sign CLA. Is that ok to merge?

@varun06
Copy link
Contributor

varun06 commented Jul 2, 2019

yeah, sounds good.

@varun06 varun06 requested a review from bai July 2, 2019 11:44
@bai
Copy link
Contributor

bai commented Jul 2, 2019

Thanks for your contribution, LGTM.

@varun06 varun06 merged commit c50148e into IBM:master Jul 2, 2019
@andrewhao888 andrewhao888 deleted the m_consumer_fetch_size_overflow branch July 3, 2019 02:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants