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
Performance enhancements related to caching #269
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
…ct out-of-memory (OOM) crashes
facebook-github-bot
added
the
CLA Signed
This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
label
Nov 22, 2022
…ing and transactions away from the underlying database implementation so the implementer won't care.
A note to reviewers, it's probably better to review this commit-by-commit. It'll make more sense and break-down the changes to more manageable amounts |
eozturk1
reviewed
Nov 24, 2022
kevinlewi
approved these changes
Nov 24, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good to me. The separating of the cache logic from the db is nice to have for sure!
slawlor
added a commit
that referenced
this pull request
Nov 24, 2022
* Adding support for dashmap and the ability to measure the size of the cache * Adding support for memory pressure processing, such that we can protect out-of-memory (OOM) crashes * AKD rewrite with new storage model. This abstracts the notion of caching and transactions away from the underlying database implementation so the implementer won't care. * Refactoring the other libraries to support the new storage model * Removing features and moving to always enabled functionality * cargo fmt * Rename Storage trait to Database * Fix type annotation in transaction.rs so clippy can run properly * Small bug in setting cached values on a db batch set write * removing old feature flag * Resolving #217 * Exposing cache clean frequency option * logical ordering of transaction v. cache mgmt
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
CLA Signed
This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
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.
This PR adds support for
dashmap
which is a more performant multi-access cache when there are multiple readers and writerstokio::sync::RwLock<bool>
and replacing it with anAtomicBool
which is also more performant under high-parallel loadDatabase
trait andStorageManager
struct which manages the specified database. This greatly simplifies what a db needs to implement and abstracts away caching & transaction management to a shared logic space.Update: closes #217