forked from kafka4beam/brod
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The brod:fold/8 did not work correctly when the last message in the message set a transaction commit. The output looked like this: ``` %%% brod_consumer_SUITE ==> t_fold_transactions: FAILED %%% brod_consumer_SUITE ==> {function_clause, [{lists,last,[[]],[{file,"lists.erl"},{line,228}]}, {brod_utils,handle_fetch_rsp,7, [{file,"/home/indrek/gems/brod/src/brod_utils.erl"},{line,661}]}, {brod_consumer_SUITE,t_fold_transactions,1, [{file,"/home/indrek/gems/brod/test/brod_consumer_SUITE.erl"}, {line,443}]}, {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1783}]}, {test_server,run_test_case_eval1,6, [{file,"test_server.erl"},{line,1292}]}, {test_server,run_test_case_eval,9, [{file,"test_server.erl"},{line,1224}]}]} ``` The issue was that `#kafka_message{offset = LastOffset} = lists:last(Msgs),` was used, when the Msgs list was empty. Now instead of trying to infer next offset from the kafka_message, we pass the NextFetchOffset from the brod_utils:fetch/4 function. Fixes kafka4beam#588
- Loading branch information
Showing
2 changed files
with
42 additions
and
17 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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