apoorvmittal10 commented on code in PR #20758:
URL: https://github.com/apache/kafka/pull/20758#discussion_r2454975033


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ShareConsumerImpl.java:
##########
@@ -609,6 +609,15 @@ public synchronized ConsumerRecords<K, V> poll(final 
Duration timeout) {
             throw e.cause();
         } finally {
             kafkaShareConsumerMetrics.recordPollEnd(timer.currentTimeMs());
+
+            // Handle any acknowledgements which completed while we were 
waiting, but do not throw
+            // the exception because the fetched records would then not be 
returned to the caller
+            try {
+                handleCompletedAcknowledgements(false);
+            } catch (Throwable t) {
+                log.warn("Failed invoking acknowledgement commit callback", t);

Review Comment:
   nit: Please if we can change the log line to say exception happened in 
vallback but callback was invoked.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to