Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
* 4.1.5
- Fix logging garbled partition list for `stop_producers_for_lost_partitions` log.

* 4.1.4
- Optimize log message `replayq_overflow_dropped_produce_calls`.
Changed to `dropped_produce_requests` with a descriptive `cause` to hint detailed reason: `buffer_size_limit` or `high_system_RAM_usage`.
Expand Down
8 changes: 7 additions & 1 deletion src/wolff_producers.erl
Original file line number Diff line number Diff line change
Expand Up @@ -753,8 +753,14 @@ handle_partition_count_change(St, Topic, Connections0) ->
%% This means the topic has been deleted then recreated,
%% because Kafka doesn't support topic downscaling, hence error level log for more visibility
LostPartitions = lists:seq(NowCount, OldCount - 1),
First = NowCount,
Last = OldCount - 1,
PartitionsStr = case First =:= Last of
true -> integer_to_list(First);
false -> integer_to_list(First) ++ ",...," ++ integer_to_list(Last)
end,
log_error("stop_producers_for_lost_partitions",
#{partitions => LostPartitions, producer_id => producer_id(St)}),
#{partitions => PartitionsStr, producer_id => producer_id(St)}),
PartitionProducers = find_producers(St, ClientId, Group, Topic, LostPartitions, []),
ProducerId = producer_id(St),
lists:foreach(fun(P) -> delete_producer(ClientId, Group, Topic, P) end, LostPartitions),
Expand Down