C0urante commented on a change in pull request #11046: URL: https://github.com/apache/kafka/pull/11046#discussion_r753385489
########## File path: clients/src/main/java/org/apache/kafka/clients/consumer/KafkaConsumer.java ########## @@ -1235,8 +1237,14 @@ public void assign(Collection<TopicPartition> partitions) { } } - final Map<TopicPartition, List<ConsumerRecord<K, V>>> records = pollForFetches(timer); - if (!records.isEmpty()) { + final Fetch<K, V> fetch = pollForFetches(timer); + if (!fetch.isEmpty()) { + if (fetch.records().isEmpty()) { + assert fetch.containsAborts(); Review comment: I've removed the check; I think that the cost of throwing an error to the user is a little too high since the alternative (an empty batch of records) seems less harmful. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org