kafka-commits mailing list archives

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

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


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

commit 1ff4d74494aaf9d49c7efafd9aa9c70db4d6540b
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 10f3060..f078f89 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
@@ -840,7 +840,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