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:
us...@infra.apache.org


Reply via email to