CalvinConfluent commented on code in PR #14706: URL: https://github.com/apache/kafka/pull/14706#discussion_r1520116151
########## metadata/src/main/java/org/apache/kafka/controller/ReplicationControlManager.java: ########## @@ -1837,8 +1872,13 @@ void generateLeaderAndIsrUpdates(String context, // from the target ISR, but we need to exclude it here too, to handle the case // where there is an unclean leader election which chooses a leader from outside // the ISR. + // + // If the caller passed a valid broker ID for brokerWithUncleanShutdown, rather than + // passing NO_LEADER, this node should not be an acceptable leader. We also exclude + // brokerWithUncleanShutdown from ELR and ISR. IntPredicate isAcceptableLeader = - r -> (r != brokerToRemove) && (r == brokerToAdd || clusterControl.isActive(r)); + r -> (r != brokerToRemove && r != brokerWithUncleanShutdown) + && (r == brokerToAdd || clusterControl.isActive(r)); Review Comment: I disabled the handleUncleanShutdown if ELR is not enabled. -- 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