chia7712 commented on code in PR #20758:
URL: https://github.com/apache/kafka/pull/20758#discussion_r2483976728
##########
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("Exception thrown in acknowledgement commit
callback", t);
+ }
Review Comment:
@TaiJuWu thanks for this find. The flaky behaviour and its root cause have
already been logged in https://issues.apache.org/jira/browse/KAFKA-19840
--
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]