GitHub user tcrayford opened a pull request: https://github.com/apache/kafka/pull/1598
KAFKA-3933: close deepIterator during log recovery Avoids leaking native memory and hence crashing brokers on bootup due to running out of memory. Introduces `kafka.common.ClosableIterator`, which is an iterator that can be closed, and changes the signature of `ByteBufferMessageSet.deepIterator` to return it, then changes the caller `LogSegment` to always close the iterator. https://issues.apache.org/jira/browse/KAFKA-3933 You can merge this pull request into a Git repository by running: $ git pull https://github.com/heroku/kafka dont_leak_native_memory Alternatively you can review and apply these changes as the patch at: https://github.com/apache/kafka/pull/1598.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1598 ---- commit 06e748f4cddddc7dd8c2a860bd938b535e8172e1 Author: Tom Crayford <tcrayf...@googlemail.com> Date: 2016-07-08T11:50:21Z KAFKA-3933: close deepIterator during log recovery Avoids leaking native memory and hence crashing brokers on bootup due to running out of memory. Introduces `kafka.common.ClosableIterator`, which is an iterator that can be closed, and changes the signature of `ByteBufferMessageSet.deepIterator` to return it, then changes the caller `LogSegment` to always close the iterator. ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---