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 22:01:14 UTC

[kafka] branch 2.3 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.3
in repository https://gitbox.apache.org/repos/asf/kafka.git


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

commit d92192192d4e18ff32325e12c02b7b0226eb2a98
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 cc9484c..ace8ff7 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
@@ -1137,8 +1137,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);
+                                    }
                                 }
                             }
                     );