vamossagar12 commented on code in PR #12802:
URL: https://github.com/apache/kafka/pull/12802#discussion_r1037397259


##########
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/distributed/DistributedHerder.java:
##########
@@ -1645,6 +1646,8 @@ private void startAndStop(Collection<Callable<Void>> 
callables) {
             startAndStopExecutor.invokeAll(callables);
         } catch (InterruptedException e) {
             // ignore
+        } catch (RejectedExecutionException re) {
+            log.error("startAndStopExecutor already shutdown or full. Not 
invoking explicit connector/task shutdown");

Review Comment:
   Thanks for the clarification @gharris1727 . Hmm I guess one of the ways to 
prevent the exception to occur is to stop  connectors/tasks from within the 
`stop` method instead of the current async way via halt. This way, atleast the 
connector/task stop requests can be handled before attmepting to shut down the 
startAndStopExecutor. Is there any approach you have in mind?



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

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to