-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Decouple rocksdb dependency from ethcore #8320
Conversation
This adds KeyValueDBHandler which handles opening a new database, thus allow us to move the restoration db open logic out of ethcore.
…couple-rocksdb
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
|
This is off-topic for this PR, but eventually for #7915 the code for snapshots should be refactored in order to remove the notion of |
|
I realized that there's an indirect dep on kvdb_rocksdb through I double checked. And at least from the compilation logs we indeed don't have kvdb_rocksdb dependency on |
Yes, a |
This decouples tsdb_rocksdb from ethcore, getting us one step closer towards #7865.
There're three places where ethcore was dependent on rocksdb.
Arc<KeyValueDB>is directly passed to it.KeyValueDBHandler. This embeds predefined configs (if any), and exports anopenfunction which can be used to open a DB at a given path.DatabaseCompactionProfileto rocksdbCompactionProfile. This is only used by Parity CLI, so it's just moved there.For this change, we do have several additional trait objects. But given that we are already using
Arc<KeyValueDB>in many places, I don't think this would be any big deal.