You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by rh...@apache.org on 2020/01/21 23:38:56 UTC

[kafka] branch 2.2 updated: KAFKA-9143: Log task reconfiguration error only when it happened (#7648)

This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/2.2 by this push:
     new f480bf6  KAFKA-9143: Log task reconfiguration error only when it happened (#7648)
f480bf6 is described below

commit f480bf67783d672d21251904bcd98087735b24fa
Author: Ivan Yurchenko <iv...@gmail.com>
AuthorDate: Tue Jan 21 22:52:40 2020 +0200

    KAFKA-9143: Log task reconfiguration error only when it happened (#7648)
    
    This commit makes `DistributedHerder` log that some error has happened during task reconfiguration only when it actually has happened.
    
    Author: Ivan Yurchenko <iv...@gmail.com>
    Reviewer: Randall Hauch <rh...@gmail.com>
---
 .../apache/kafka/connect/runtime/distributed/DistributedHerder.java | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/distributed/DistributedHerder.java b/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/distributed/DistributedHerder.java
index b229102..b367aa1 100644
--- a/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/distributed/DistributedHerder.java
+++ b/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/distributed/DistributedHerder.java
@@ -966,8 +966,10 @@ public class DistributedHerder extends AbstractHerder implements Runnable {
                             }, new Callback<Void>() {
                                 @Override
                                 public void onCompletion(Throwable error, Void result) {
-                                    log.error("Unexpected error during connector task reconfiguration: ", error);
-                                    log.error("Task reconfiguration for {} failed unexpectedly, this connector will not be properly reconfigured unless manually triggered.", connName);
+                                    if (error != null) {
+                                        log.error("Unexpected error during connector task reconfiguration: ", error);
+                                        log.error("Task reconfiguration for {} failed unexpectedly, this connector will not be properly reconfigured unless manually triggered.", connName);
+                                    }
                                 }
                             }
                     );