4.x: handle record_list_too_large error - #101
Merged
Merged
Conversation
Logic is similar to message_too_large: split the batch, if a single message is still too large, drop it.
…ist_too_large fix: handle record_list_too_large error in produce response
thalesmg
approved these changes
Sep 11, 2025
Comment on lines
+892
to
+903
| %% Max message size is smaller than segment bytes to tigger record_list_too_large error. | ||
| %% This is usually a bad server/topic configuration, but we need to cover it anyways. | ||
| record_list_too_large_test_() -> | ||
| {timeout, 60, | ||
| fun() -> test_record_list_too_large() end}. | ||
|
|
||
| test_record_list_too_large() -> | ||
| Topic = "record-list-too-large-" ++ integer_to_list(abs(erlang:monotonic_time())), | ||
| Partitions = 1, | ||
| ReplicationFactor = 1, | ||
| MaxMessageBytes = 1000, | ||
| SegmentBytes = 100, |
Contributor
There was a problem hiding this comment.
Suggested change
| %% Max message size is smaller than segment bytes to tigger record_list_too_large error. | |
| %% This is usually a bad server/topic configuration, but we need to cover it anyways. | |
| record_list_too_large_test_() -> | |
| {timeout, 60, | |
| fun() -> test_record_list_too_large() end}. | |
| test_record_list_too_large() -> | |
| Topic = "record-list-too-large-" ++ integer_to_list(abs(erlang:monotonic_time())), | |
| Partitions = 1, | |
| ReplicationFactor = 1, | |
| MaxMessageBytes = 1000, | |
| SegmentBytes = 100, | |
| %% Max message size is smaller than segment bytes to trigger record_list_too_large error. | |
| %% This is usually a bad server/topic configuration, but we need to cover it anyways. | |
| record_list_too_large_test_() -> | |
| {timeout, 60, | |
| fun() -> test_record_list_too_large() end}. | |
| test_record_list_too_large() -> | |
| Topic = "record-list-too-large-" ++ integer_to_list(abs(erlang:monotonic_time())), | |
| Partitions = 1, | |
| ReplicationFactor = 1, | |
| MaxMessageBytes = 1000, | |
| SegmentBytes = 100, |
The test description seems to be the opposite of the actual setup? i.e., max message size is 1_000, but segment size is 100?
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.
Port #100
Handle
record_list_too_largeerror returned from Kafka.Similar to
message_too_largeerror, the batch is split, then dropped if single call is still too large.