-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
chore(rocksdb): getter for inner database handle #2532
Conversation
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.
LGTM
@@ -106,6 +106,10 @@ where | |||
}) | |||
} | |||
|
|||
pub fn inner(&self) -> &RocksDb<Historical<Description>> { |
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.
The problem with exposing it is that anyone can commit to the internal database bypassing the historical functionality. Maybe it is possible to just add backup functionality directly?
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.
Or maybe we can put it under the "test-helpers" feature flag?
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.
Maybe we can add a read-only wrapper for this somehow?
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.
draft pr: #2535
Linked Issues/PRs
Description
Should allow consumers of the library to get the inner db handle if they wanted to create a backup etc.
Checklist
Before requesting review
After merging, notify other teams
[Add or remove entries as needed]