showuon commented on code in PR #16284:
URL: https://github.com/apache/kafka/pull/16284#discussion_r1636434931


##########
metadata/src/main/java/org/apache/kafka/controller/ConfigurationControlManager.java:
##########
@@ -495,8 +496,19 @@ void deleteTopicConfigs(String name) {
         configData.remove(new ConfigResource(Type.TOPIC, name));
     }
 
-    boolean uncleanLeaderElectionEnabledForTopic(String name) {
-        return false; // TODO: support configuring unclean leader election.
+    /**
+     * Check if this topic has "unclean.leader.election.enable" set to true.
+     *
+     * @param topicName            The topic name for the config.
+     * @return true if this topic has uncleanLeaderElection enabled
+     */
+    boolean uncleanLeaderElectionEnabledForTopic(String topicName) {

Review Comment:
   Good point! Adopt approach 2 to trigger uncleanLeaderElection for no leader 
partitions when leader rebalancing. Thanks.



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