kpatelatwork commented on a change in pull request #10503:
URL: https://github.com/apache/kafka/pull/10503#discussion_r610062836



##########
File path: 
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/WorkerTask.java
##########
@@ -185,8 +185,15 @@ private void doRun() throws InterruptedException {
 
             execute();
         } catch (Throwable t) {
-            log.error("{} Task threw an uncaught and unrecoverable exception. 
Task is being killed and will not recover until manually restarted", this, t);
-            throw t;
+            if (!stopping) {
+                log.error("{} Task threw an uncaught and unrecoverable 
exception. Task is being killed and will not recover until manually restarted", 
this, t);
+                throw t;
+            } else {
+                log.warn("{} During stop, task threw an uncaught and 
unrecoverable exception: {}.", this, t.getMessage());

Review comment:
       Thanks for the review. I implemented all the suggestions. @C0urante  
please review again.




-- 
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


Reply via email to