[ https://issues.apache.org/jira/browse/KAFKA-2405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14658285#comment-14658285 ]
Ismael Juma commented on KAFKA-2405: ------------------------------------ We have 43 instances of `System.exit` in `core` and a few instances of `Runtime.halt`. Is there a document explaining when it's OK to exit and when it is not? > KafkaHealthCheck kills the JVM in handleSessionEstablishmentError > ----------------------------------------------------------------- > > Key: KAFKA-2405 > URL: https://issues.apache.org/jira/browse/KAFKA-2405 > Project: Kafka > Issue Type: Bug > Components: core > Reporter: jaikiran pai > Assignee: jaikiran pai > Fix For: 0.8.3 > > > The current code in KafkaHealthCheck in trunk does this: > {code} > override def handleSessionEstablishmentError(error: Throwable): Unit = { > fatal("Could not establish session with zookeeper", error) > System.exit(-1) > } > {code} > thus terminating the JVM. A session establishment error shouldn't cause the > JVM to terminate. -- This message was sent by Atlassian JIRA (v6.3.4#6332)