-
Notifications
You must be signed in to change notification settings - Fork 180
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
[Storage Refactor] Init pebble DB in scaffold. #6949
base: master
Are you sure you want to change the base?
Conversation
@@ -1925,14 +1930,6 @@ func WithLogLevel(level string) Option { | |||
} | |||
} | |||
|
|||
// WithDB takes precedence over WithDataDir and datadir will be set to empty if DB is set using this option | |||
func WithDB(db *badger.DB) Option { |
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.
not being used anywhere
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.
I think this was added to support the consensus follower
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6949 +/- ##
==========================================
- Coverage 41.13% 41.11% -0.02%
==========================================
Files 2119 2120 +1
Lines 185938 185945 +7
==========================================
- Hits 76479 76457 -22
- Misses 103054 103077 +23
- Partials 6405 6411 +6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@@ -1889,9 +1896,7 @@ func WithBindAddress(bindAddress string) Option { | |||
|
|||
func WithDataDir(dataDir string) Option { | |||
return func(config *BaseConfig) { | |||
if config.db == nil { |
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.
I think this was used for the consensus follower
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.
I don't understand why we need both WithDB
and WithDataDir
. I think we should keep only one, no?
@@ -1925,14 +1930,6 @@ func WithLogLevel(level string) Option { | |||
} | |||
} | |||
|
|||
// WithDB takes precedence over WithDataDir and datadir will be set to empty if DB is set using this option | |||
func WithDB(db *badger.DB) Option { |
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.
I think this was added to support the consensus follower
This PR adds a flag
pebble-dir
with default value/data/pebble-dir
for storing pebble database data. It will be used for the transition from badger to pebbleDB.