AndrewJSchofield commented on code in PR #19295: URL: https://github.com/apache/kafka/pull/19295#discussion_r2016245476
########## clients/src/main/java/org/apache/kafka/clients/consumer/internals/ShareConsumerImpl.java: ########## @@ -644,8 +645,12 @@ private ShareFetch<K, V> collect(Map<TopicIdPartition, NodeAcknowledgements> ack if (currentFetch.isEmpty()) { final ShareFetch<K, V> fetch = fetchCollector.collect(fetchBuffer); if (fetch.isEmpty()) { + // Check for any acknowledgements which could have come from control records (GAP) and include them. + Map<TopicIdPartition, NodeAcknowledgements> combinedAcknowledgements = new LinkedHashMap<>(acknowledgementsMap); + combinedAcknowledgements.putAll(fetch.takeAcknowledgedRecords()); + // Fetch more records and send any waiting acknowledgements - applicationEventHandler.add(new ShareFetchEvent(acknowledgementsMap)); + applicationEventHandler.add(new ShareFetchEvent(combinedAcknowledgements)); Review Comment: This is clearly not quite right yet. I want to see the log dump for the situation which causes this and understand the batching. -- 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