Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-16052 OOM in Kafka test suite
  3. KAFKA-16074

Fix thread leaks in ReplicaManagerTest

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.7.0
    • None
    • None

    Description

      Following @dajac 's finding in #15063, I found we also create new RemoteLogManager in ReplicaManagerTest, but didn't close them.

      While investigating ReplicaManagerTest, I also found there are other threads leaking:

      1. remote fetch reaper thread. It's because we create a reaper thread in test, which is not expected. We should create a mocked one like other purgatory instance.
      2. Throttle threads. We created a quotaManager to feed into the replicaManager, but didn't close it. Actually, we have created a global quotaManager instance and will close it on AfterEach. We should re-use it.
      3. replicaManager and logManager didn't invoke close after test.

      Attachments

        Issue Links

          Activity

            People

              showuon Luke Chen
              showuon Luke Chen
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: