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



##########
File path: 
metadata/src/main/java/org/apache/kafka/controller/QuorumController.java
##########
@@ -858,7 +858,7 @@ private void rescheduleMaybeFenceStaleBrokers() {
             return;
         }
         scheduleDeferredWriteEvent(MAYBE_FENCE_REPLICAS, nextCheckTimeNs, () 
-> {
-            ControllerResult<Void> result = 
replicationControl.maybeFenceStaleBrokers();
+            ControllerResult<Void> result = 
replicationControl.maybeFenceOneStaleBroker();
             rescheduleMaybeFenceStaleBrokers();

Review comment:
       It sounds like you are saying there may still be a race condition if the 
next expiration is scheduled too quickly. However, I think the way the code 
works, we are guaranteed to have this result reflected before the next 
scheduled operation can trigger. It would be good to have a test covering this 
scenario.




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