kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jun...@apache.org
Subject git commit: kafka-1699; autoRebalanceScheduler.shutdown() causes deadlock while controller shutting down; patched by Sriharsha Chintalapani; reviewed by Jun Rao
Date Fri, 10 Oct 2014 04:08:46 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 043190c60 -> 09b2b3cbe


kafka-1699; autoRebalanceScheduler.shutdown() causes deadlock while controller shutting down;
patched by Sriharsha Chintalapani; reviewed by Jun Rao


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

Branch: refs/heads/trunk
Commit: 09b2b3cbe07e8cdea42434fa6c54af0a064a93a2
Parents: 043190c
Author: Sriharsha Chintalapani <schintalapani@hortonworks.com>
Authored: Thu Oct 9 21:08:38 2014 -0700
Committer: Jun Rao <junrao@gmail.com>
Committed: Thu Oct 9 21:08:38 2014 -0700

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


http://git-wip-us.apache.org/repos/asf/kafka/blob/09b2b3cb/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 381c52f..51a5bad 100644
--- a/core/src/main/scala/kafka/controller/KafkaController.scala
+++ b/core/src/main/scala/kafka/controller/KafkaController.scala
@@ -345,12 +345,13 @@ class KafkaController(val config : KafkaConfig, zkClient: ZkClient,
val brokerSt
     if (deleteTopicManager != null)
       deleteTopicManager.shutdown()
 
+    // shutdown leader rebalance scheduler
+    if (config.autoLeaderRebalanceEnable)
+      autoRebalanceScheduler.shutdown()
+
     inLock(controllerContext.controllerLock) {
       // de-register partition ISR listener for on-going partition reassignment task
       deregisterReassignedPartitionsIsrChangeListeners()
-      // shutdown leader rebalance scheduler
-      if (config.autoLeaderRebalanceEnable)
-        autoRebalanceScheduler.shutdown()
       // shutdown partition state machine
       partitionStateMachine.shutdown()
       // shutdown replica state machine


Mime
View raw message