kafka-commits mailing list archives

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

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


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

commit c7c59320ae35d55e650b77d5c127b2f7ba907f9a
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 afb17f8..729011c 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
@@ -809,7 +809,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