Repository: kafka
Updated Branches:
  refs/heads/trunk 241c3ebb2 -> deb2b004c


KAFKA-3013: Display the topic-partition in the exception message for expired 
batches in recordAccumulator

Added topic-partition information to the exception message on batch expiry in 
RecordAccumulator

Author: MayureshGharat <[email protected]>

Reviewers: Gwen Shapira, Lin Dong, Ismael Juma

Closes #695 from MayureshGharat/kafka-3013


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

Branch: refs/heads/trunk
Commit: deb2b004cb983baa9e2fbff47b39a6f9a243623d
Parents: 241c3eb
Author: MayureshGharat <[email protected]>
Authored: Mon Mar 14 19:22:05 2016 -0700
Committer: Gwen Shapira <[email protected]>
Committed: Mon Mar 14 19:22:05 2016 -0700

----------------------------------------------------------------------
 .../org/apache/kafka/clients/producer/internals/RecordBatch.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/deb2b004/clients/src/main/java/org/apache/kafka/clients/producer/internals/RecordBatch.java
----------------------------------------------------------------------
diff --git 
a/clients/src/main/java/org/apache/kafka/clients/producer/internals/RecordBatch.java
 
b/clients/src/main/java/org/apache/kafka/clients/producer/internals/RecordBatch.java
index 7b5fbbe..eb7bbb3 100644
--- 
a/clients/src/main/java/org/apache/kafka/clients/producer/internals/RecordBatch.java
+++ 
b/clients/src/main/java/org/apache/kafka/clients/producer/internals/RecordBatch.java
@@ -143,7 +143,7 @@ public final class RecordBatch {
         if ((this.records.isFull() && requestTimeout < (now - 
this.lastAppendTime)) || requestTimeout < (now - (this.lastAttemptMs + 
lingerMs))) {
             expire = true;
             this.records.close();
-            this.done(-1L, Record.NO_TIMESTAMP, new TimeoutException("Batch 
Expired"));
+            this.done(-1L, Record.NO_TIMESTAMP, new TimeoutException("Batch 
containing " + recordCount + " record(s) expired due to timeout while 
requesting metadata from brokers for " + topicPartition));
         }
 
         return expire;

Reply via email to