-
Notifications
You must be signed in to change notification settings - Fork 7
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
Change storage to use LevelDB #12
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This will be necessary to retrieve types and know how to encode/decode values
The goal is to eventually move to ldb and drop the disk storage
Before this commit the iterator was not respecting the prefix search, it was searching the whole keyspace.
The bulk of path.py was used by our own storage implementation. None of that is used after the LevelDB migration.
The logic and its comments should only live in ldb.py
The current results are using ldb.batch_write()
Closed
hltbra
added a commit
that referenced
this pull request
Jan 24, 2019
* Change storage to use LevelDB instead of our own directory structure and file formats (#12)
🎆 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I migrated all of the storage to use LevelDB. The results are significantly better and I am ready to try this on a couple of production systems.
I have tried different backends before and they didn't perform better than what we had. I picked LevelDB because it's a small library and a lot simpler than RockDB (fewer features, fewer options, smaller in size). I am definitely considering RocksDB if we think the performance can be better with the usage of column families instead of one keyspace with every value in it.
With this pull request, there's one LevelDB database per Redis database (16 total).
Each data structure has at least one key on LevelDB:
All LevelDB keys have prefixes indicating their type (e.g., hash field, set member, sorted set score). The prefixes were inspired by the blackwidow project 1 2
Examples: