Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible memory leak when iterating over database with MergeOperator enabled #144

Open
vitalyisaev2 opened this issue Aug 24, 2018 · 2 comments

Comments

@vitalyisaev2
Copy link
Contributor

vitalyisaev2 commented Aug 24, 2018

We faced with memory leak with one of our applications, which periodically iterates over whole Rocksdb database to compute some statistics. We also use MergeOperator implemented in Go, and it turns out that the memory allocated within MergeOperator is never freed.

Please see this repository for the further infomation: https://github.com/vitalyisaev2/gorocksdb_merge_operator_issue

Picture of heap profile to grab your attention:
heap profile

@NgaiShunChan
Copy link

NgaiShunChan commented Dec 18, 2018

In file gorocksdb.c, an empty implementation of function gorocksdb_filterpolicy_delete_filter and gorocksdb_mergeoperator_delete_value preventing default function free to be called.
See rocksdb/blob/master/db/c.cc
Which may lead to memory leak.

@vitalyisaev2
Copy link
Contributor Author

vitalyisaev2 commented Jan 10, 2019

@NgaiShunChan thanks for the tip, I'm not sure I have understood it right now, but I'll try to make a research

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants