[ 
https://issues.apache.org/jira/browse/KAFKA-12380?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Luke Chen resolved KAFKA-12380.
-------------------------------
    Fix Version/s: 3.3.0
       Resolution: Fixed

> Executor in Connect's Worker is not shut down when the worker is
> ----------------------------------------------------------------
>
>                 Key: KAFKA-12380
>                 URL: https://issues.apache.org/jira/browse/KAFKA-12380
>             Project: Kafka
>          Issue Type: Bug
>          Components: KafkaConnect
>            Reporter: Randall Hauch
>            Priority: Minor
>              Labels: newbie
>             Fix For: 3.3.0
>
>
> The `Worker` class has an [`executor` 
> field|https://github.com/apache/kafka/blob/02226fa090513882b9229ac834fd493d71ae6d96/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/Worker.java#L100]
>  that the public constructor initializes with a new cached thread pool 
> ([https://github.com/apache/kafka/blob/02226fa090513882b9229ac834fd493d71ae6d96/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/Worker.java#L127|https://github.com/apache/kafka/blob/02226fa090513882b9229ac834fd493d71ae6d96/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/Worker.java#L127].]).
> When the worker is stopped, it does not shutdown this executor. This is 
> normally okay in the Connect runtime and MirrorMaker 2 runtimes, because the 
> worker is stopped only when the JVM is stopped (via the shutdown hook in the 
> herders).
> However, we instantiate and stop the herder many times in our integration 
> tests, and this means we're not necessarily shutting down the herder's 
> executor. Normally this won't hurt, as long as all of the runnables that the 
> executor threads run actually do terminate. But it's possible those threads 
> *might* not terminate in all tests. TBH, I don't know that such cases 
> actually exist.
>  



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to