Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-6383

StreamThread.shutdown doesn't clean up completely when called before StreamThread.start

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.0.0
    • 1.1.0
    • streams
    • None

    Description

      The following code leaks a producer network thread:

      ks = new KafkaStreams(...);
      ks.close();
      

      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.

      Attachments

        Activity

          People

            rohanpd Rohan Desai
            rohanpd Rohan Desai
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: