KAFKA-19795: Mark the minOneMessage as false when delayedRemoteFetch is present in the first partition. #20706
+11
−9
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.
When the FETCH request read from remote log for multiple partitions,
then all the partitions are marked with minOneMessage as true. This is
not the expected behavior:
Assume that the FETCH request is configured with fetchMaxBytes as 50 MB
and max.partition.fetch.bytes as 1 MB. And, the broker is hosting 5
partitions as leader for the topic. The FETCH request might try to read
the data from remote for all the 5 partitions. If the size of the
message in the topic is 30 MB, then we might be returning back 150 MB of
response instead of 30 MB due to minOneMessage set to true for all the
remote-read requests.
Mark the minOneMessage as false when delayedRemoteFetch is present in
the first partition.
Discussion thread:
#20088 (comment)
Reviewers: Luke Chen [email protected], Satish Duggana
[email protected]