KAFKA-7660: fix streams and Metrics memory leaks#5980
KAFKA-7660: fix streams and Metrics memory leaks#5980mjsax merged 2 commits intoapache:2.0from vvcephei:2.0-memory-leaks
Conversation
In StreamsMetricsImpl, the parentSensors map was keeping references to Sensors after the sensors themselves had been removed. Reviewers: Matthias J. Sax <matthias@confluent.io>, Bill Bejeck <bill@confluent.io>, Guozhang Wang <wangguoz@gmail.com>
A heap dump provided by Patrik Kleindl in https://issues.apache.org/jira/browse/KAFKA-7660 identifies the childrenSensors map in Metrics as keeping references to sensors alive after they have been removed. This PR fixes it and adds a test to be sure. Reviewers: Jason Gustafson <jason@confluent.io>, Guozhang Wang <wangguoz@gmail.com>
|
@mjsax @guozhangwang , This is a further backport of a couple of small memory-leak fixes from trunk. I'm not sure if you want to keep them as separate commits in the backport as well... |
|
@ijuma I'm not sure who to ask about this; asking you because you've weighed in on a few build configuration issues I've seen... It looks like the JDK10 build may be misconfigured: I'm wondering if we want to go ahead and bump 2.0 builds up to jdk11? I think we were only testing jdk10 provisionally until jdk11 got released. |
|
Retest this please |
|
retest this please |
|
@vvcephei thanks for the heads-up. I disabled findBugs in the Java 10 PR build since findBugs doesn't work with Java 9+. We can't support Java 11 in the older branches without backporting a lot of changes and we don't want to do that. Please let me know if there are still problems. |
|
Thanks @ijuma ! |
|
Thanks, @mjsax ! |
Backport two memory-leak fixes (#5974 and #5953) (see also 2.1: #5979)
Committer Checklist (excluded from commit message)