You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by gu...@apache.org on 2015/11/27 21:14:03 UTC

kafka git commit: KAFKA-2899: improve logging when unexpected exceptions thrown in reading local log

Repository: kafka
Updated Branches:
  refs/heads/trunk 4a0e011be -> 09b43beb1


KAFKA-2899: improve logging when unexpected exceptions thrown in reading local log

Currently we don't log exceptions raised when reading from the local log which makes tracking down the cause of problems a bit tricky.

Author: Ben Stopford <be...@gmail.com>

Reviewers: Guozhang Wang

Closes #593 from benstopford/small-patches


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

Branch: refs/heads/trunk
Commit: 09b43beb1d0aabb2776da2a5790752992ef617f7
Parents: 4a0e011
Author: Ben Stopford <be...@gmail.com>
Authored: Fri Nov 27 12:13:59 2015 -0800
Committer: Guozhang Wang <wa...@gmail.com>
Committed: Fri Nov 27 12:13:59 2015 -0800

----------------------------------------------------------------------
 core/src/main/scala/kafka/server/ReplicaManager.scala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/09b43beb/core/src/main/scala/kafka/server/ReplicaManager.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/server/ReplicaManager.scala b/core/src/main/scala/kafka/server/ReplicaManager.scala
index a4553b3..7a99aad 100644
--- a/core/src/main/scala/kafka/server/ReplicaManager.scala
+++ b/core/src/main/scala/kafka/server/ReplicaManager.scala
@@ -556,7 +556,7 @@ class ReplicaManager(val config: KafkaConfig,
           case e: Throwable =>
             BrokerTopicStats.getBrokerTopicStats(topic).failedFetchRequestRate.mark()
             BrokerTopicStats.getBrokerAllTopicsStats().failedFetchRequestRate.mark()
-            error("Error processing fetch operation on partition [%s,%d] offset %d".format(topic, partition, offset))
+            error("Error processing fetch operation on partition [%s,%d] offset %d".format(topic, partition, offset), e)
             LogReadResult(FetchDataInfo(LogOffsetMetadata.UnknownOffsetMetadata, MessageSet.Empty), -1L, fetchSize, false, Some(e))
         }
       (TopicAndPartition(topic, partition), partitionDataAndOffsetInfo)