You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2020/09/18 08:43:02 UTC

[GitHub] [kafka] dajac commented on a change in pull request #9302: KAFKA-10149: Allow auto preferred leader election when partitions are reassigning

dajac commented on a change in pull request #9302:
URL: https://github.com/apache/kafka/pull/9302#discussion_r490794812



##########
File path: core/src/main/scala/kafka/controller/KafkaController.scala
##########
@@ -1067,10 +1067,7 @@ class KafkaController(val config: KafkaConfig,
       // check ratio and if greater than desired ratio, trigger a rebalance for the topic partitions
       // that need to be on this broker
       if (imbalanceRatio > (config.leaderImbalancePerBrokerPercentage.toDouble / 100)) {
-        // do this check only if the broker is live and there are no partitions being reassigned currently
-        // and preferred replica election is not in progress
         val candidatePartitions = topicsNotInPreferredReplica.keys.filter(tp =>
-          controllerContext.partitionsBeingReassigned.isEmpty &&

Review comment:
       @bob-barrett It totally makes sense to not block it the auto preferred leader election if there is any ongoing reassignments in the cluster. However, I wonder if we should continue to disallow it for the partitions being reassigned in order to not mess up with the their ongoing reassignment. I am not sure if this is a real concern or not though. Have you thought about this case?




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org