kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gwens...@apache.org
Subject kafka git commit: KAFKA-2405; Don't kill the JVM on session establishment failure
Date Wed, 05 Aug 2015 00:10:16 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk a56a79055 -> 7a666f7aa


KAFKA-2405; Don't kill the JVM on session establishment failure

As noted in the JIRA https://issues.apache.org/jira/browse/KAFKA-2405 currently the KafkaHealthCheck
causes the JVM to terminate in cases where session establishment with Zookeeper fails. I don't
know if retrying (after a while) is a better way to fix this but at least, IMO, the session
establishment failure shouldn't kill the JVM. This commit removes the `System.exit()` call.

Author: Jaikiran Pai <jaikiran.pai@gmail.com>

Reviewers: Gwen Shapira <cshapi@gmail.com>

Closes #111 from jaikiran/kafka-2405 and squashes the following commits:

0255fdb [Jaikiran Pai] KAFKA-2405 Don't kill the JVM on session establishment failure


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

Branch: refs/heads/trunk
Commit: 7a666f7aa8b1be927579817187e0b5b93543b5e2
Parents: a56a790
Author: Jaikiran Pai <jaikiran.pai@gmail.com>
Authored: Tue Aug 4 17:10:02 2015 -0700
Committer: Chen Shapira <gwen@chens-mbp.gateway.sonic.net>
Committed: Tue Aug 4 17:10:02 2015 -0700

----------------------------------------------------------------------
 core/src/main/scala/kafka/controller/KafkaController.scala | 2 +-
 core/src/main/scala/kafka/server/KafkaHealthcheck.scala    | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/7a666f7a/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 6844602..b19e57f 100755
--- a/core/src/main/scala/kafka/controller/KafkaController.scala
+++ b/core/src/main/scala/kafka/controller/KafkaController.scala
@@ -1138,7 +1138,7 @@ class KafkaController(val config : KafkaConfig, zkClient: ZkClient,
val brokerSt
     }
 
     override def handleSessionEstablishmentError(error: Throwable): Unit = {
-      //no-op handleSessionEstablishmentError in KafkaHealthCheck should System.exit and
log the error.
+      //no-op handleSessionEstablishmentError in KafkaHealthCheck should handle this error
in its handleSessionEstablishmentError
     }
   }
 

http://git-wip-us.apache.org/repos/asf/kafka/blob/7a666f7a/core/src/main/scala/kafka/server/KafkaHealthcheck.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/server/KafkaHealthcheck.scala b/core/src/main/scala/kafka/server/KafkaHealthcheck.scala
index ea0c996..e6e270b 100644
--- a/core/src/main/scala/kafka/server/KafkaHealthcheck.scala
+++ b/core/src/main/scala/kafka/server/KafkaHealthcheck.scala
@@ -92,7 +92,6 @@ class KafkaHealthcheck(private val brokerId: Int,
 
     override def handleSessionEstablishmentError(error: Throwable): Unit = {
       fatal("Could not establish session with zookeeper", error)
-      System.exit(-1)
     }
   }
 


Mime
View raw message