-
Notifications
You must be signed in to change notification settings - Fork 338
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: nuke storage #2577
feat: nuke storage #2577
Conversation
d2ff26d
to
d543960
Compare
Codecov Report
@@ Coverage Diff @@
## master #2577 +/- ##
==========================================
- Coverage 63.68% 63.55% -0.14%
==========================================
Files 232 232
Lines 25799 25869 +70
==========================================
+ Hits 16430 16440 +10
- Misses 7877 7937 +60
Partials 1492 1492
Continue to review full report at Codecov.
|
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.
Reviewed 7 of 7 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @acud)
cmd/bee/cmd/db.go, line 162 at r1 (raw file):
v, err := cmd.Flags().GetString(optionNameVerbosity) if err != nil { return fmt.Errorf("get verbosity: %v", err)
Use %w
verb for err
instead of %v
. The same in the whole function body.
pkg/statestore/leveldb/leveldb.go, line 26 at r1 (raw file):
var _ storage.StateStorer = (*Store)(nil) // store uses LevelDB to store values.
Alter also the comment, it should be in the following format 'Store ...`.
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.
Reviewed 6 of 6 files at r2, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @acud)
// store uses LevelDB to store values. | ||
type store struct { | ||
// Store uses LevelDB to store values. | ||
type Store struct { |
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.
why is this suddenly exported? only to execute the nuke function? can't this be added to the interface (or to an extended version of that)?
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
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. please make sure there is documentation (for users) somewhere on what the consequences of nuking the db are (especially in combination with forget-overlay
).
Adds a
db nuke
command to erase local storage and state store data so that the node can start afresh but keep accounting dataThis change is