kirktrue commented on code in PR #14406: URL: https://github.com/apache/kafka/pull/14406#discussion_r1361358097
########## clients/src/main/java/org/apache/kafka/clients/consumer/internals/FetchCollector.java: ########## @@ -162,7 +165,9 @@ private Fetch<K, V> fetchRecords(final CompletedFetch nextInLineFetch) { throw new IllegalStateException("Missing position for fetchable partition " + tp); if (nextInLineFetch.nextFetchOffset() == position.offset) { - List<ConsumerRecord<K, V>> partRecords = nextInLineFetch.fetchRecords(fetchConfig, fetchConfig.maxPollRecords); + List<ConsumerRecord<K, V>> partRecords = nextInLineFetch.fetchRecords(fetchConfig, Review Comment: I am not fond of this code as written, and have made at least two attempts to change it. It's a bit messy but I will take another pass to clean it up. Ideally most—if not all—of the logic would live in `FetchBuffer`. ########## clients/src/main/java/org/apache/kafka/clients/consumer/internals/FetchCollector.java: ########## @@ -162,7 +165,9 @@ private Fetch<K, V> fetchRecords(final CompletedFetch nextInLineFetch) { throw new IllegalStateException("Missing position for fetchable partition " + tp); if (nextInLineFetch.nextFetchOffset() == position.offset) { - List<ConsumerRecord<K, V>> partRecords = nextInLineFetch.fetchRecords(fetchConfig, fetchConfig.maxPollRecords); + List<ConsumerRecord<K, V>> partRecords = nextInLineFetch.fetchRecords(fetchConfig, Review Comment: I am not fond of this code as written, and have made at least two attempts to change it. It's a bit messy but I will take another pass to clean it up. Ideally most—if not all—of the logic would live in `FetchBuffer`. -- 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