[
https://issues.apache.org/jira/browse/KAFKA-3735?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15292622#comment-15292622
]
ASF GitHub Bot commented on KAFKA-3735:
---------------------------------------
GitHub user guozhangwang opened a pull request:
https://github.com/apache/kafka/pull/1411
KAFKA-3735: Dispose all RocksObejcts upon completeness
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/guozhangwang/kafka K3735-dispose-rocksobject
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/kafka/pull/1411.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 #1411
----
commit e561a48c4dfa3057b60a55ce1540382d4324dcbe
Author: Guozhang Wang <[email protected]>
Date: 2016-05-20T03:17:15Z
dispose all rocksobejcts
----
> RocksDB objects needs to be disposed after usage
> ------------------------------------------------
>
> Key: KAFKA-3735
> URL: https://issues.apache.org/jira/browse/KAFKA-3735
> Project: Kafka
> Issue Type: Bug
> Components: streams
> Reporter: Guozhang Wang
> Assignee: Guozhang Wang
> Labels: architecture
>
> The RocksDB JNI interface {{RocksObject}} has a dispose() function which need
> to be explicitly triggered after it is not reused, otherwise GC may not be
> able to de-reference it off-heap and hence effective lead to memory leak.
> See: https://github.com/facebook/rocksdb/issues/752#issuecomment-146511412
> We need to make sure all library-controlled RocksDB objects are disposed
> after usage, and also indicate users to {{close}} those out-of-control
> objects.
> Note that RocksDB community is also going to replace the {{dispose}} API by
> extending {{AutoClosable}} in the future, so this ticket may need to be
> re-visited when upgrade RocksDB versions:
> https://www.facebook.com/groups/rocksdb.dev/permalink/870848569680325/
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)