feat(storage): Top level commands create a new database using config.DefaultDBProvider()#4697
Merged
melekes merged 3 commits intoalesforz/code-uses-storage-pkgfrom Jan 13, 2025
Conversation
5 tasks
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
melekes
approved these changes
Jan 13, 2025
This file contains hidden or 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
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.
Context
As part of the work in #4601, we want to allow users to use their own database if they don't like pebble. As CometBFT will use the same DB interface that cometbft-db uses, users can provide their own implementation of the interface that uses a different database under the hood. They will, therefore, have to change the
config.DefaultDBProviderfunction to return their implementation instead of our default.To minimize the places in the code to change, we think that users should only change the
config.DefaultDBProviderto user thei DB. Therefore, some places in the code must change to user this function rather than callingdb.NewDB()directly.This PR
This PR changes the commands in the
cmdfolder to useconfig.DefaultDBProvider()to create databases.PR checklist
[ ] Changelog entry added in.changelog(we use unclog to manage our changelog)[] Updated relevant documentation (docs/orspec/) and code comments