Skip to content

KAFKA-7660: fix streams and Metrics memory leaks#5979

Merged
mjsax merged 2 commits intoapache:2.1from
vvcephei:2.1-memory-leaks
Dec 4, 2018
Merged

KAFKA-7660: fix streams and Metrics memory leaks#5979
mjsax merged 2 commits intoapache:2.1from
vvcephei:2.1-memory-leaks

Conversation

@vvcephei
Copy link
Copy Markdown
Contributor

Backport two memory-leak fixes (#5974 and #5953)

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

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>
@vvcephei
Copy link
Copy Markdown
Contributor Author

@mjsax @guozhangwang , This backports 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...

@vvcephei vvcephei changed the title KAFKA-7660: fix streams and Metrics memory leaks. KAFKA-7660: fix streams and Metrics memory leaks Nov 30, 2018
@mjsax mjsax added the streams label Dec 4, 2018
@mjsax mjsax merged commit 2b50cbc into apache:2.1 Dec 4, 2018
@vvcephei
Copy link
Copy Markdown
Contributor Author

vvcephei commented Dec 4, 2018

Thanks, @mjsax !

@vvcephei vvcephei deleted the 2.1-memory-leaks branch December 4, 2018 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants