AndrewJSchofield commented on code in PR #18672: URL: https://github.com/apache/kafka/pull/18672#discussion_r1933889523
########## clients/src/main/java/org/apache/kafka/clients/consumer/internals/ShareConsumeRequestManager.java: ########## @@ -172,73 +172,58 @@ public PollResult poll(long currentTimeMs) { k -> sessionHandlers.computeIfAbsent(node.id(), n -> new ShareSessionHandler(logContext, n, memberId))); TopicIdPartition tip = new TopicIdPartition(topicId, partition); - Acknowledgements acknowledgementsToSend = fetchAcknowledgementsToSend.remove(tip); - if (acknowledgementsToSend != null) { - metricsManager.recordAcknowledgementSent(acknowledgementsToSend.size()); - fetchAcknowledgementsInFlight.put(tip, acknowledgementsToSend); + Acknowledgements acknowledgementsToSend = null; + Map<TopicIdPartition, Acknowledgements> nodeAcknowledgementsMap = fetchAcknowledgementsToSend.get(node.id()); Review Comment: I think there will need to be a follow-on PR for this. In a way, you're correct, but I think to maintain the ordering of things, we need to fail some acknowledgements more aggressively from the poll loop. I had been avoiding that, but I think it's inevitable actually. -- 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