ahuang98 commented on code in PR #22505:
URL: https://github.com/apache/kafka/pull/22505#discussion_r3397769997


##########
raft/src/main/java/org/apache/kafka/raft/internals/BlockingMessageQueue.java:
##########
@@ -17,41 +17,82 @@
 package org.apache.kafka.raft.internals;
 
 import org.apache.kafka.common.errors.InterruptException;
+import org.apache.kafka.raft.RaftMessage;
 import org.apache.kafka.raft.RaftMessageQueue;
 
 import java.util.Optional;
 import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.CompletionStage;
 import java.util.concurrent.LinkedBlockingQueue;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicInteger;
 
 public class BlockingMessageQueue implements RaftMessageQueue {
-    private final BlockingQueue<QueueEntry> queue = new 
LinkedBlockingQueue<>();
+    // Marker object for wakeup events
+    private static final Object WAKEUP = new Object();
+
+    private final BlockingQueue<Object> queue = new LinkedBlockingQueue<>();

Review Comment:
   yeah, should be safe to just check `entry instanceof WakeupEntry` since it 
won't throw on null and returns true iff we see a wakeup event



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