kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject [kafka] branch trunk updated: MINOR: Do not log retriable offset commit exceptions as errors (#5904)
Date Thu, 25 Apr 2019 17:10:55 GMT
This is an automated email from the ASF dual-hosted git repository.

jgus pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/trunk by this push:
     new f6c59df  MINOR: Do not log retriable offset commit exceptions as errors (#5904)
f6c59df is described below

commit f6c59df07ed865a8bdc777db73216347f4882114
Author: Yaroslav Klymko <t3hnar@users.noreply.github.com>
AuthorDate: Thu Apr 25 19:10:42 2019 +0200

    MINOR: Do not log retriable offset commit exceptions as errors (#5904)
    
    Reviewers: Jason Gustafson <jason@confluent.io>
---
 .../kafka/clients/consumer/internals/ConsumerCoordinator.java       | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/clients/src/main/java/org/apache/kafka/clients/consumer/internals/ConsumerCoordinator.java
b/clients/src/main/java/org/apache/kafka/clients/consumer/internals/ConsumerCoordinator.java
index 64a97ab..68e98ba 100644
--- a/clients/src/main/java/org/apache/kafka/clients/consumer/internals/ConsumerCoordinator.java
+++ b/clients/src/main/java/org/apache/kafka/clients/consumer/internals/ConsumerCoordinator.java
@@ -823,7 +823,11 @@ public final class ConsumerCoordinator extends AbstractCoordinator {
                 if (error == Errors.NONE) {
                     log.debug("Committed offset {} for partition {}", offset, tp);
                 } else {
-                    log.error("Offset commit failed on partition {} at offset {}: {}", tp,
offset, error.message());
+                    if (error.exception() instanceof RetriableException) {
+                        log.warn("Offset commit failed on partition {} at offset {}: {}",
tp, offset, error.message());
+                    } else {
+                        log.error("Offset commit failed on partition {} at offset {}: {}",
tp, offset, error.message());
+                    }
 
                     if (error == Errors.GROUP_AUTHORIZATION_FAILED) {
                         future.raise(new GroupAuthorizationException(groupId));


Mime
View raw message