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 in this commit:
https://github.com/apache/kafka/pull/16284/commits/a9df33af3657099fb33c7c97a31d20e12a9600b5
and
https://github.com/apache/kafka/pull/16284/commits/79472296471778cde50ca2875aaa522e59f45e49.
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]