kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jjko...@apache.org
Subject git commit: KAFKA-1365; Second Manual preferred replica leader election command always fails; reviewed by Joel Koshy.
Date Fri, 18 Apr 2014 01:31:03 GMT
Repository: kafka
Updated Branches:
  refs/heads/0.8.1 82f4a8e1c -> 839f1b122


KAFKA-1365; Second Manual preferred replica leader election command always fails; reviewed
by Joel Koshy.


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/839f1b12
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/839f1b12
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/839f1b12

Branch: refs/heads/0.8.1
Commit: 839f1b1220d2f32fe10ceb51474efaddf1968e25
Parents: 82f4a8e
Author: Guozhang Wang <guwang@linkedin.com>
Authored: Thu Apr 17 18:25:56 2014 -0700
Committer: Joel Koshy <jjkoshy@gmail.com>
Committed: Thu Apr 17 18:25:56 2014 -0700

----------------------------------------------------------------------
 core/src/main/scala/kafka/controller/KafkaController.scala | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/839f1b12/core/src/main/scala/kafka/controller/KafkaController.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/controller/KafkaController.scala b/core/src/main/scala/kafka/controller/KafkaController.scala
index e225226..f221f84 100644
--- a/core/src/main/scala/kafka/controller/KafkaController.scala
+++ b/core/src/main/scala/kafka/controller/KafkaController.scala
@@ -610,7 +610,7 @@ class KafkaController(val config : KafkaConfig, zkClient: ZkClient) extends
Logg
     }
   }
 
-  def onPreferredReplicaElection(partitions: Set[TopicAndPartition], isTriggeredByAutoRebalance:
Boolean = true) {
+  def onPreferredReplicaElection(partitions: Set[TopicAndPartition], isTriggeredByAutoRebalance:
Boolean = false) {
     info("Starting preferred replica leader election for partitions %s".format(partitions.mkString(",")))
     try {
       controllerContext.partitionsUndergoingPreferredReplicaElection ++= partitions
@@ -1115,7 +1115,7 @@ class KafkaController(val config : KafkaConfig, zkClient: ZkClient)
extends Logg
                       !deleteTopicManager.isTopicQueuedUpForDeletion(topicPartition.topic)
&&
                       !deleteTopicManager.isTopicDeletionInProgress(topicPartition.topic)
&&
                       controllerContext.allTopics.contains(topicPartition.topic)) {
-                    onPreferredReplicaElection(Set(topicPartition), false)
+                    onPreferredReplicaElection(Set(topicPartition), true)
                   }
                 }
               }


Mime
View raw message