Skip to content

Commit

Permalink
Fix the loop of consumer poll, so the consumer can cache more than on…
Browse files Browse the repository at this point in the history
…e record in signal poll. (apache#3852)
  • Loading branch information
se7enkings authored and merlimat committed Mar 19, 2019
1 parent e29bfd0 commit f1be6bd
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ public ConsumerRecords<K, V> poll(long timeoutMillis) {
lastReceivedOffset.put(tp, offset);
unpolledPartitions.remove(tp);

if (++numberOfRecords < MAX_RECORDS_IN_SINGLE_POLL) {
if (++numberOfRecords >= MAX_RECORDS_IN_SINGLE_POLL) {
break;
}

Expand Down

0 comments on commit f1be6bd

Please sign in to comment.