-
Notifications
You must be signed in to change notification settings - Fork 3.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
feat(store/v2): support rocksdb and pebbledb as RawDB #19607
Conversation
WalkthroughWalkthroughThe introduced changes focus on implementing Changes
Assessment against linked issues
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
@alexanderbez your pull request is missing a changelog! |
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.
Review Status
Actionable comments generated: 6
Configuration used: .coderabbit.yml
Files selected for processing (6)
- store/db/db_test.go (2 hunks)
- store/db/goleveldb.go (1 hunks)
- store/db/pebbledb.go (1 hunks)
- store/db/rocksdb.go (1 hunks)
- store/go.mod (1 hunks)
- store/go.sum (1 hunks)
Additional comments: 8
store/db/db_test.go (3)
- 19-21: The addition of the
TearDownSuite
method for closing the database connection after tests is a good practice for resource cleanup.- 100-107: The
TestPebbleDBSuite
function correctly initializes a PebbleDB instance for testing, using a temporary directory for isolation.- 109-116: The
TestRocksDBSuite
function correctly initializes a RocksDB instance for testing, using a temporary directory for isolation.store/go.mod (1)
- 13-13: The update of the
github.com/cosmos/iavl
dependency tov1.1.0
is noted. Ensure that this version's changes are compatible with the project's requirements and that all tests pass.store/db/pebbledb.go (1)
- 44-70: The
Close
,Get
, andHas
methods are correctly implemented and follow best practices for resource management and error handling.store/db/rocksdb.go (1)
- 54-67: The
Close
,Get
, andHas
methods are correctly implemented and follow best practices for resource management and error handling.store/db/goleveldb.go (1)
- 20-20: Explicitly declaring
GoLevelDB
as an implementation ofstore.RawDB
is a good practice for clarity and ensures thatGoLevelDB
adheres to thestore.RawDB
interface. This change enhances code readability and maintainability.store/go.sum (1)
- 49-50: The update of
github.com/cosmos/iavl
fromv1.0.0-beta.1.0.20240125174944-11ba4961dae9
tov1.1.0
is noted. Ensure that this version bump is compatible with the rest of the project's dependencies and does not introduce breaking changes that could affect the project's stability or functionality.
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.
Review Status
Actionable comments generated: 0
Configuration used: .coderabbit.yml
Files selected for processing (2)
- store/go.mod (1 hunks)
- store/go.sum (1 hunks)
Files skipped from review as they are similar to previous changes (2)
- store/go.mod
- store/go.sum
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.
there needs to be a global NewDB func like we have in cosmos-db to avoid needing to make this at a higher level for iavl. its better to house all the logic for store here instead of consumers needing to create wrappers left and right
dismissing due to changes
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.
Review Status
Actionable comments generated: 6
Configuration used: .coderabbit.yml
Files selected for processing (4)
- store/db/goleveldb.go (1 hunks)
- store/db/pebbledb.go (1 hunks)
- store/db/rocksdb.go (1 hunks)
- store/db/rocksdb_noflag.go (1 hunks)
Files skipped from review as they are similar to previous changes (3)
- store/db/goleveldb.go
- store/db/pebbledb.go
- store/db/rocksdb.go
Additional comments: 1
store/db/rocksdb_noflag.go (1)
- 1-2: The use of both
//go:build !rocksdb
and// +build !rocksdb
directives for conditional compilation is correct and follows best practices. This ensures compatibility with both older and newer versions of Go. However, it's important to note that the// +build
directive is deprecated in favor of//go:build
in Go 1.17 and later. If support for Go versions before 1.17 is not required, consider removing the// +build
directive.
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.
Review Status
Actionable comments generated: 0
Configuration used: .coderabbit.yml
Files selected for processing (4)
- store/db/db.go (1 hunks)
- store/db/goleveldb.go (2 hunks)
- store/db/pebbledb.go (1 hunks)
- store/db/rocksdb.go (1 hunks)
Files skipped from review as they are similar to previous changes (4)
- store/db/db.go
- store/db/goleveldb.go
- store/db/pebbledb.go
- store/db/rocksdb.go
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.
Review Status
Actionable comments generated: 0
Configuration used: .coderabbit.yml
Files selected for processing (1)
- store/db/rocksdb.go (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- store/db/rocksdb.go
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.
Review Status
Actionable comments generated: 0
Configuration used: .coderabbit.yml
Files selected for processing (5)
- store/db/db_test.go (2 hunks)
- store/db/rocksdb.go (1 hunks)
- store/db/rocksdb_noflag.go (1 hunks)
- store/go.mod (1 hunks)
- store/go.sum (1 hunks)
Files skipped from review as they are similar to previous changes (5)
- store/db/db_test.go
- store/db/rocksdb.go
- store/db/rocksdb_noflag.go
- store/go.mod
- store/go.sum
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.
Review Status
Actionable comments generated: 0
Configuration used: .coderabbit.yml
Files selected for processing (2)
- store/db/rocksdb.go (1 hunks)
- store/db/rocksdb_noflag.go (1 hunks)
Files skipped from review as they are similar to previous changes (2)
- store/db/rocksdb.go
- store/db/rocksdb_noflag.go
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.
Review Status
Actionable comments generated: 0
Configuration used: .coderabbit.yml
Files selected for processing (1)
- store/db/rocksdb.go (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- store/db/rocksdb.go
Description
Closes: #19606
This PR introduces support for PebbleDB and RocksDB as backing implementations of
RawDB
which is used to perform a migration from store/v1 to store/v2.Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
in the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
Summary by CodeRabbit