You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/03/17 20:01:59 UTC

[GitHub] [kafka] rhauch commented on a change in pull request #10337: KAFKA-12380: Executor in Connect's Worker is not shut down when the worker is

rhauch commented on a change in pull request #10337:
URL: https://github.com/apache/kafka/pull/10337#discussion_r596333717



##########
File path: connect/runtime/src/main/java/org/apache/kafka/connect/runtime/Worker.java
##########
@@ -226,6 +226,7 @@ public void stop() {
 
         offsetBackingStore.stop();
         metrics.stop();
+        stopExecutor();

Review comment:
       Are there advantages of putting this simple if-check in a separate methods? Would it be simpler and more straightforward to just do the check here:
   ```suggestion
           if (executor != null) {
               executor.shutdownNow();
           }
   ```
   and then remove the `stopExecutor()` method?
   
   There is already precedence for an if-check a few lines above.




----------------------------------------------------------------
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:
users@infra.apache.org