-
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
test(store/v2): use pebbledb in store tests #23213
Conversation
📝 WalkthroughWalkthroughThe pull request modifies the configuration file Changes
Possibly related PRs
Suggested labels
Suggested reviewers
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 using PR comments)
Other keywords and placeholders
Documentation and Community
|
Disagree, especially that many chain won't start from scratch but upgrade. We've kept leveldb for testing for that reason (see comments in simapp custom config) |
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.
Actionable comments posted: 1
🧹 Nitpick comments (1)
server/v2/testdata/config.toml (1)
43-43
: Consider adding a changelog entrySince this changes the default database backend for tests, please add a changelog entry under the testing section to document this change.
📜 Review details
Configuration used: .coderabbit.yml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
server/v2/testdata/config.toml
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Summary
🔇 Additional comments (1)
server/v2/testdata/config.toml (1)
43-43
: Verify pebbledb support and migration pathWhile this change aligns with CometBFT's recommendation to move away from goleveldb, please verify:
- Is pebbledb fully supported in the current version?
- Are there any special build tags or dependencies required?
- What is the migration path for existing test databases?
✅ Verification successful
PebbleDB is fully supported but requires careful migration
- PebbleDB is fully implemented with production-ready features including concurrent compactions and configurable options.
- No special build tags required - just needs the
github.com/cockroachdb/pebble
dependency which is already included.- For migrating test databases:
- Stop the application
- Back up your data directory
- Change
db_backend
to "pebbledb"- Start with a fresh data directory for tests
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Check if pebbledb is imported and configured in the codebase rg -l 'pebbledb|"pebble"' --type go # Look for build tags or constraints related to pebbledb rg -l '//\s*\+build.*pebble' --type go rg -l '//go:build.*pebble' --type goLength of output: 236
Script:
#!/bin/bash # Check db.go implementation cat store/v2/db/db.go # Check go.mod for pebble dependency cat go.mod | grep -i pebble # Look for migration utilities or documentation rg -l "migration|upgrade" --type md rg -i "migrate.*leveldb.*pebble|upgrade.*leveldb.*pebble" --type go --type mdLength of output: 3451
Script:
#!/bin/bash # Find NewPebbleDB implementation rg -A 10 "func NewPebbleDB" --type go # Look for any pebble-specific configuration rg -i "pebble.*config|pebble.*options" --type goLength of output: 1732
@@ -40,7 +40,7 @@ moniker = "aurn-node" | |||
# * badgerdb (uses github.com/dgraph-io/badger) | |||
# - EXPERIMENTAL | |||
# - use badgerdb build tag (go build -tags badgerdb) | |||
db_backend = "goleveldb" | |||
db_backend = "pebbledb" |
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.
🛠️ Refactor suggestion
Update documentation to include pebbledb as a supported backend
The comment block above this line lists all supported database backends but doesn't include pebbledb. Please update the documentation to include information about pebbledb, its characteristics, and any build tags required.
@julienrbrt I understand your comment about existing chains, but we should prioritize test for the recommended setup. If goleveldb is marked deprecated, then we either have 2 tests, or use a non deprecated setting in the default test (which could mean to remove deprecation note for goleveldb). |
Comet is testing all their dbs, we shouldn't have to test each of them ourselves again. We are testing ours. |
There was a bug that was not detected, until I tried to use PebbleDB. So, if we want to test goleveldb by default, maybe we should do a smoke test with PebbleDB? |
If we do not have any we should probably have a systemtest with pebbledb yes, but we are talking about the SDK db and not the cometbft db (which was what this PR was doing) |
Description
Based on CometBFT docs, goleveldb is deprecated, so let's use pebbledb as the default store/v2 backend in tests.
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.
Please see Pull Request Reviewer section in the contributing guide for more information on how to review a pull request.
I have...
Summary by CodeRabbit