hachikuji commented on a change in pull request #9482:
URL: https://github.com/apache/kafka/pull/9482#discussion_r514504593



##########
File path: raft/src/main/java/org/apache/kafka/raft/KafkaRaftClient.java
##########
@@ -1688,14 +1694,39 @@ private long pollCurrentState(long currentTimeMs) 
throws IOException {
         }
     }
 
+    private void pollListeners() {
+        // Register any listeners added since the last poll
+        while (!pendingListeners.isEmpty()) {

Review comment:
       I doubt we would use it in practice, though I guess it would open the 
door to changing roles dynamically, which might be interesting in the future. 
That said, it was simple to add and useful in testing since it gave me an easy 
way to initialize a state where a listener had not caught up.




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to