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 <[email protected]>
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 <[email protected]>
    Reviewer: Randall Hauch <[email protected]>
---
 .../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);
+                                    }
                                 }
                             }
                     );

Reply via email to