fix(consumer): decouple FetchRequest.MaxBytes from MaxResponseSize#3538
Merged
Conversation
Per KIP-74, a v3+ broker may return up to one extra RecordBatch beyond the requested MaxBytes to guarantee progress when a single record exceeds the limit. Sending request.MaxBytes = MaxResponseSize left no headroom, so legitimate responses tripped the response-header size check with "message of length N too large or too small". Introduce Consumer.Fetch.MaxBytes (default 50 MiB, matching the JVM client's fetch.max.bytes) for the request limit, leaving MaxResponseSize as the OOM safety net. Fixes #1370 Signed-off-by: Dominic Evans <dominic.evans@uk.ibm.com>
Collaborator
Author
|
I'm going to add a 'breaking' label to this one so its flagged up in the release notes. It's not technically a breaking change, but it is a change in behaviour that by default we'll only fetch up to 50MB in a single fetch request where before we could have fetched up to 100MB |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Per KIP-74, a v3+ broker may return up to one extra RecordBatch beyond the requested MaxBytes to guarantee progress when a single record exceeds the limit. Sending request.MaxBytes = MaxResponseSize left no headroom, so legitimate responses tripped the response-header size check with "message of length N too large or too small".
Introduce Consumer.Fetch.MaxBytes (default 50 MiB, matching the JVM client's fetch.max.bytes) for the request limit, leaving MaxResponseSize as the OOM safety net.
Fixes #1370