kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jun...@apache.org
Subject kafka git commit: KAFKA-3924; Replacing halt with exit upon LEO mismatch to trigger gra…
Date Wed, 27 Jul 2016 15:22:38 GMT
Repository: kafka
Updated Branches:
  refs/heads/0.10.0 0a37bedd9 -> 279f89a67

KAFKA-3924; Replacing halt with exit upon LEO mismatch to trigger gra…

…ceful shutdown

The patch is pretty simple and the justification is explained in https://issues.apache.org/jira/browse/KAFKA-3924

I could not find Andrew Olson, who seems to be the contributor of this part of the code, in
github so I am not sure whom I should ask to review the patch.

 the contribution is my original work and that i license the work to the project under the
project's open source license.

Author: Maysam Yabandeh <myabandeh@dropbox.com>

Reviewers: Ismael Juma <ismael@juma.me.uk>, Andrew Olson <andrew.olson@cerner.com>,
Jun Rao <junrao@gmail.com>

Closes #1634 from maysamyabandeh/KAFKA-3924

(cherry picked from commit d58c2d9ac6047b14ab22e19c9f7c857bb85a970d)
Signed-off-by: Jun Rao <junrao@gmail.com>

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

Branch: refs/heads/0.10.0
Commit: 279f89a67c8e884a345ff88a4bde6399f48b2e64
Parents: 0a37bed
Author: Maysam Yabandeh <myabandeh@dropbox.com>
Authored: Wed Jul 27 08:22:23 2016 -0700
Committer: Jun Rao <junrao@gmail.com>
Committed: Wed Jul 27 08:22:35 2016 -0700

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

diff --git a/core/src/main/scala/kafka/server/ReplicaFetcherThread.scala b/core/src/main/scala/kafka/server/ReplicaFetcherThread.scala
index d58f120..c6a28c6 100644
--- a/core/src/main/scala/kafka/server/ReplicaFetcherThread.scala
+++ b/core/src/main/scala/kafka/server/ReplicaFetcherThread.scala
@@ -175,10 +175,10 @@ class ReplicaFetcherThread(name: String,
       if (!LogConfig.fromProps(brokerConfig.originals, AdminUtils.fetchEntityConfig(replicaMgr.zkUtils,
         ConfigType.Topic, topicAndPartition.topic)).uncleanLeaderElectionEnable) {
         // Log a fatal error and shutdown the broker to ensure that data loss does not unexpectedly
-        fatal("Halting because log truncation is not allowed for topic %s,".format(topicAndPartition.topic)
+        fatal("Exiting because log truncation is not allowed for topic %s,".format(topicAndPartition.topic)
           " Current leader %d's latest offset %d is less than replica %d's latest offset
           .format(sourceBroker.id, leaderEndOffset, brokerConfig.brokerId, replica.logEndOffset.messageOffset))
-        Runtime.getRuntime.halt(1)
+        System.exit(1)
       warn("Replica %d for partition %s reset its fetch offset from %d to current leader
%d's latest offset %d"

View raw message