This repository was archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Merged
DatabaseSource::Auto #9500
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
9d76e4e
implement "auto" database backend in client/db, in progress, #9201
debris 3f4305f
move fn supports_ref_counting from DatabaseSource enum to Database tr…
debris efe4fa5
update kvdb_rocksdb to 0.13 and use it's new config feature to prope…
debris adbd471
Merge branch 'master' into auto_db
debris 1897664
tests for auto database reopening
debris 253a487
introduce OpenDbError to cleanup opening database error handling and …
debris d76ae74
Merge branch 'master' into auto_db
debris 4279aae
cargo fmt strings again
debris 395f017
cargo fmt strings again
debris 6c4401a
rename DataSettingsSrc to fix test compilation
debris 681bbeb
fix the call to the new kvdb-rocksdb interdace in tests to fix compil…
debris 91fd53d
simplify OpenDbError and make it compile even when paritydb and rocks…
debris b0a4b9d
cargo fmt
debris 65cd74a
fix compilation without flag with-parity-db
debris 6d6a2f7
fix unused var compilation warning
debris 5729ee5
support different paths for rocksdb and paritydb in DatabaseSouce::Auto
debris 119f50f
support "auto" database option in substrate cli
debris c7fb48e
enable Lz4 compression for some of the parity-db colums as per review…
debris 63ca796
applied review suggestions
debris File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -358,10 +358,11 @@ impl DatabaseSource { | |
| /// Return dabase path for databases that are on the disk. | ||
| pub fn path(&self) -> Option<&Path> { | ||
| match self { | ||
| DatabaseSource::Auto { .. } => { | ||
| // TODO: | ||
| unimplemented!(); | ||
| }, | ||
| // as per https://github.com/paritytech/substrate/pull/9500#discussion_r684312550 | ||
| // | ||
| // IIUC this is needed for polkadot to create its own dbs, so until it can use parity db | ||
| // I would think rocksdb, but later parity-db. | ||
| DatabaseSource::Auto { paritydb_path, .. } => Some(&paritydb_path), | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this does not matter much for now. There's a separate item in #9201 to resolve polkadot db path properly. |
||
| DatabaseSource::RocksDb { path, .. } | DatabaseSource::ParityDb { path } => Some(&path), | ||
| DatabaseSource::Custom(..) => None, | ||
| } | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.