-
Notifications
You must be signed in to change notification settings - Fork 945
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
opt.Options.Filter question #8
Comments
Of course, the bloom filter are optional, you may create your own filter implementation if you wish. The default value for The filter block will not created if no filter defined (the default). |
Thanks for you answer, Suryandaru. So, if I reopen the database using a different bloom filter, will 9 mar 2013 kl. 17:47 skrev Suryandaru Triandana notifications@github.com: Of course, the bloom filter are optional, you may create your own filter — |
The new filter will take effect eventually. New sstable will be generated using the new filter (filter block on the old sstable that generated by old filter will be ignored by new filter during read operation), eventually as compaction happen, new filter will take effect entirely. You may force rebuilding of entire database by overwriting entire keys (e.g. overwrites keys with its own value).
The filter state are written in the sstable including the name of filter that generate it. During read operation the filter block will be loaded and used iff it has same name with the current filter. |
The documentation came out of issue/question syndtr#8.
I know it's been a while now, but I just wanted to thank you for your answer! I've on my TODO to add this to the documentation and finally did it today. See pull request #9.
Revisiting this answer it struck me how this could possibly lead to a huge performance penalty during the migration period from one filter to another. This is even worse because usually when you are changing filter, you are dependent on the fact that 1) querying needs to be fast and 2) you have a database with many keys. A possible way to work around the above issue would be to introduce Last, but not least, I am not experiencing this as an issue. In fact, I don't have goleveldb in production as of now. Rather, you should see this as a potential future improvement/feature. Would you like me to file a separate issue for it? I'd love to hear your input. Also, do you know if the mother project (LevelDB) has implemented something like this? |
Sound like a good idea.
That would be great
No, there is no such mechanism in the original leveldb implementation. |
Said and done - see #11. |
Thanks
|
Since the documentation does not mention anything about this, is it possible to use different filters on
leveldb.Open(...)
? The reason I ask is because the bloom filter might need to be enlarged as your database is growing.The text was updated successfully, but these errors were encountered: