[ 
https://issues.apache.org/jira/browse/KAFKA-9143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16967661#comment-16967661
 ] 

ASF GitHub Bot commented on KAFKA-9143:
---------------------------------------

ivanyu commented on pull request #7648: KAFKA-9143: Log task reconfiguration 
error only when it happened
URL: https://github.com/apache/kafka/pull/7648
 
 
   This commit makes `DistributedHerder` log that some error has happened 
during task reconfiguration only when it actually has happened.
   
   *More detailed description of your change,
   if necessary. The PR title and PR message become
   the squashed commit message, so use a separate
   comment to ping reviewers.*
   
   *Summary of testing strategy (including rationale)
   for the feature or bug fix. Unit and/or integration
   tests are expected for any behaviour change and
   system tests should be considered for larger changes.*
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> DistributedHerder misleadingly log error on connector task reconfiguration
> --------------------------------------------------------------------------
>
>                 Key: KAFKA-9143
>                 URL: https://issues.apache.org/jira/browse/KAFKA-9143
>             Project: Kafka
>          Issue Type: Bug
>          Components: KafkaConnect
>            Reporter: Ivan Yurchenko
>            Assignee: Ivan Yurchenko
>            Priority: Minor
>
> In {{DistributedHerder}} inĀ {{reconfigureConnectorTasksWithRetry}} method 
> there's a 
> [callback|https://github.com/apache/kafka/blob/c552c06aed50b4d4d9a85f73ccc89bc06fa7e094/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/distributed/DistributedHerder.java#L1247]:
> {code:java}
> @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);
> }
> {code}
> It an error message even when the operation succeeded (i.e., {{error}} is 
> {{null}}).
> It should include {{if (error != null)}} condition, like in the same class 
> [in another 
> method|https://github.com/apache/kafka/blob/c552c06aed50b4d4d9a85f73ccc89bc06fa7e094/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/distributed/DistributedHerder.java#L792].



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to