hachikuji commented on code in PR #13490:
URL: https://github.com/apache/kafka/pull/13490#discussion_r1192841324


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/PrototypeAsyncConsumer.java:
##########
@@ -461,6 +507,10 @@ public void close(Duration timeout) {
 
     @Override
     public void wakeup() {
+        this.shouldWakeup.set(true);
+        if (this.activeFutures.get() != null) {
+            this.activeFutures.getAndSet(null).completeExceptionally(new 
WakeupException());

Review Comment:
   This does not seem safe. If there are concurrent calls to `getAndSet`, we 
might see NPE?



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