You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/02/02 16:51:38 UTC

[GitHub] [kafka] chia7712 commented on pull request #10022: KAFKA-12268; Return from KafkaConsumer.poll only when records available or timeout

chia7712 commented on pull request #10022:
URL: https://github.com/apache/kafka/pull/10022#issuecomment-771781849


   How about making ```Fetcher#fetchedRecords``` update metadata only if records is not empty? In other words, the [Fetcher.java#L643](https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/clients/consumer/internals/Fetcher.java#L643) can be moved to [Fetcher.java#L659](https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/clients/consumer/internals/Fetcher.java#L659). The ```FetchedRecords``` having no records always gets discarded. Hence, we don't need to set metadata of ```FetchedRecords``` when records is empty.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org