This is an automated email from the ASF dual-hosted git repository.
rhauch pushed a commit to branch 2.4
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/2.4 by this push:
new 7ce89f8 KAFKA-9143: Log task reconfiguration error only when it
happened (#7648)
7ce89f8 is described below
commit 7ce89f849b334b3f186aca450edf1715d0cdd334
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 f3861dd..1dcc9e6 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
@@ -1245,8 +1245,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);
+ }
}
}
);