peterxcli commented on PR #18175:
URL: https://github.com/apache/kafka/pull/18175#issuecomment-2567096696

   I think my original thought was wrong
   
   `unclean.leader.election.enable` has two scopes: topic-level and 
cluster-wide. If the cluster is configured with 
`unclean.leader.election.enable=true` at startup, the interval setting 
(`unclean.leader.election.interval.ms`) becomes irrelevant. This is because 
whenever the leader of a topic partition’s ISR is fenced, an unclean election 
will occur immediately. IMO, `unclean.leader.election.interval.ms` only become 
necessary when the cluster disable unclean election and enable it dynamically.
   
   > `unclean.leader.election.interval.ms` is merely a periodic task that scans 
for topic partitions without a leader and, based on the value of 
`unclean.leader.election.enable`(topic's || cluster's), determines whether to 
perform unclean leader elections for those partitions.
   
   ---
   
   Regarding enabling unclean elections at the cluster or topic level: 
Currently, in `RebootstrapTest`, only the relevant topics have unclean election 
enabled. I believe it is unnecessary to enable cluster-wide unclean election 
because those occurrence of  unclean election for some topics are expected.


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

Reply via email to