kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jjko...@apache.org
Subject [1/2] kafka git commit: KAFKA-1943; MessageSizeTooLarge and MessageSetSizeTooLarge should not be counted toward broker-side producer failure rate
Date Wed, 18 Feb 2015 01:35:49 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 5b949c7b1 -> cb40ec2e7


KAFKA-1943; MessageSizeTooLarge and MessageSetSizeTooLarge should not be counted toward broker-side
producer failure rate


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

Branch: refs/heads/trunk
Commit: b8be3140b68cb62d908ca78fe280b089ded851b8
Parents: 5b949c7
Author: Aditya Auradkar <aauradkar@linkedin.com>
Authored: Tue Feb 17 17:33:04 2015 -0800
Committer: Joel Koshy <jjkoshy@gmail.com>
Committed: Tue Feb 17 17:33:04 2015 -0800

----------------------------------------------------------------------
 core/src/main/scala/kafka/server/ReplicaManager.scala | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/b8be3140/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 ce36cc7..399f7c4 100644
--- a/core/src/main/scala/kafka/server/ReplicaManager.scala
+++ b/core/src/main/scala/kafka/server/ReplicaManager.scala
@@ -365,11 +365,15 @@ class ReplicaManager(val config: KafkaConfig,
             (topicAndPartition, LogAppendResult(LogAppendInfo.UnknownLogAppendInfo, Some(utpe)))
           case nle: NotLeaderForPartitionException =>
             (topicAndPartition, LogAppendResult(LogAppendInfo.UnknownLogAppendInfo, Some(nle)))
-          case e: Throwable =>
+          case mtl: MessageSizeTooLargeException =>
+            (topicAndPartition, LogAppendResult(LogAppendInfo.UnknownLogAppendInfo, Some(mtl)))
+          case mstl: MessageSetSizeTooLargeException =>
+            (topicAndPartition, LogAppendResult(LogAppendInfo.UnknownLogAppendInfo, Some(mstl)))
+          case t: Throwable =>
             BrokerTopicStats.getBrokerTopicStats(topicAndPartition.topic).failedProduceRequestRate.mark()
             BrokerTopicStats.getBrokerAllTopicsStats.failedProduceRequestRate.mark()
-            error("Error processing append operation on partition %s".format(topicAndPartition),
e)
-            (topicAndPartition, LogAppendResult(LogAppendInfo.UnknownLogAppendInfo, Some(e)))
+            error("Error processing append operation on partition %s".format(topicAndPartition),
t)
+            (topicAndPartition, LogAppendResult(LogAppendInfo.UnknownLogAppendInfo, Some(t)))
         }
       }
     }


Mime
View raw message