KAFKA-7204: Avoid clearing records for paused partitions on poll of MockConsumer#7505
Conversation
|
retest this please |
|
@guozhangwang @mjsax @ableegoldman can any of you guys have a look at this MR? I don't think the test failing has anything to do with the changes. Thanks 🙏 |
|
The proposed fix LGTM, cc @cmccabe @rajinisivaram for another review. |
mjsax
left a comment
There was a problem hiding this comment.
Overall LGTM. I would simplify the test a little bit.
Thanks for the review and the suggestions @mjsax . Just pushed a revised version. 👍 |
|
All three runs failed. Result not available any longer. Could it be a checkstyle issue? |
Indeed it was. Wildcard import. Solved now. Tks again. |
|
Just cycling back to this PR. Seems the Jira ticket was not assigned. I found user |
|
Would like to get a review from core team. \cc @cmccabe @rajinisivaram |
It is correct. Thanks. |
|
Ping @cmccabe and @rajinisivaram for second review and merging. |
|
Ping @hachikuji for second review and merging. |
* apache-github/trunk: KAFKA-9418; Add new sendOffsetsToTransaction API to KafkaProducer (apache#7952) KAFKA-7273 Clarification on mutability of headers passed to Converter#fromConnectData() (apache#7489) MINOR: Only update a request's local complete time in API handler if unset (apache#7813) KAFKA-9143: Log task reconfiguration error only when it happened (apache#7648) MINOR: Change the log level from ERROR to DEBUG when failing to get plugin loader for connector (apache#7964) KAFKA-9024: Better error message when field specified does not exist (apache#7819) KAFKA-7204: Avoid clearing records for paused partitions on poll of MockConsumer (apache#7505) KAFKA-9083: Various fixes/improvements for Connect's Values class (apache#7593) MINOR: log error message from Connect sink exception (apache#7555)
The previous version of MockConsumer does not allow the clients to test consecutive calls to poll while consuming only from a partial set of partitions due to the fact that it clears all the records after each call. This change makes MockConsumer clearing the records only for the partitions that are not paused (whose records are actually returned by the poll). The remaining paused partitions will retain the records.
Unit test added accordingly.
Committer Checklist (excluded from commit message)