You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Rohan Desai (JIRA)" <ji...@apache.org> on 2017/12/19 00:05:04 UTC

[jira] [Created] (KAFKA-6383) StreamThread.shutdown doesn't clean up completely when called beforeStreamThread.start

Rohan Desai created KAFKA-6383:
----------------------------------

             Summary: StreamThread.shutdown doesn't clean up completely when called beforeStreamThread.start
                 Key: KAFKA-6383
                 URL: https://issues.apache.org/jira/browse/KAFKA-6383
             Project: Kafka
          Issue Type: Bug
            Reporter: Rohan Desai


The following code leaks a producer network thread:
{code}
ks = new KafkaStreams(...);
ks.close();
{code}

The underlying issue is that KafkaStreams creates a bunch of StreamsThreads via StreamThread.create, which in turn creates a bunch of stuff (including a producer). These resources are cleaned up only when the thread exits. So if the thread was never started, then they are never cleaned up. StreamThread.shutdown should clean up if it sees that the thread has never been started.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)