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

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

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.0
    • Fix Version/s: 1.1.0
    • Component/s: streams
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: