Skip to content

4.x: handle record_list_too_large error - #101

Merged
zmstone merged 6 commits into
kafka4beam:mainfrom
zmstone:250910-sync-main-1.5
Sep 11, 2025
Merged

4.x: handle record_list_too_large error#101
zmstone merged 6 commits into
kafka4beam:mainfrom
zmstone:250910-sync-main-1.5

Conversation

@zmstone

@zmstone zmstone commented Sep 10, 2025

Copy link
Copy Markdown
Contributor

Port #100

Handle record_list_too_large error returned from Kafka.
Similar to message_too_large error, the batch is split, then dropped if single call is still too large.

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
@zmstone zmstone changed the title 250910 sync main 1.5 4.x: handle record_list_too_large error Sep 10, 2025
Comment thread test/wolff_tests.erl Outdated
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,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed.

@zmstone
zmstone merged commit d49b057 into kafka4beam:main Sep 11, 2025
4 checks passed
@zmstone
zmstone deleted the 250910-sync-main-1.5 branch September 11, 2025 19:32
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.

2 participants