cadonna commented on code in PR #14746:
URL: https://github.com/apache/kafka/pull/14746#discussion_r1394571238


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/AsyncKafkaConsumer.java:
##########
@@ -415,6 +439,27 @@ public ConsumerRecords<K, V> poll(final Duration timeout) {
             return ConsumerRecords.empty();
         } finally {
             kafkaConsumerMetrics.recordPollEnd(timer.currentTimeMs());
+            wakeupTrigger.clearActiveTask();
+        }
+    }
+
+    private CompletableFuture<Void> setupWakeupTrigger() {
+        final CompletableFuture<Void> wakeupFuture = new CompletableFuture<>();
+        return wakeupTrigger.setActiveTask(wakeupFuture);

Review Comment:
   I changed it to not use a future, but a little bit different from you 
proposal. The code became indeed simpler.



-- 
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

Reply via email to