This repository has been 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.6k
DatabaseSource::Auto #9500
Merged
DatabaseSource::Auto #9500
Conversation
This file contains 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
…ait to make it work correctly for all types of dbs
…ly auto start existing database
debris
added
A0-please_review
Pull request needs code review.
B3-apinoteworthy
C1-low
PR touches the given topic and has a low impact on builders.
D2-breaksapi
labels
Aug 4, 2021
ordian
reviewed
Aug 4, 2021
arkpar
reviewed
Aug 4, 2021
ordian
reviewed
Aug 4, 2021
arkpar
reviewed
Aug 4, 2021
Just want to make sure default CLI options is still |
…handle case when database is not enabled at the compile time
debris
commented
Aug 6, 2021
Default |
arkpar
reviewed
Aug 6, 2021
arkpar
reviewed
Aug 7, 2021
// | ||
// 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), |
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 does not matter much for now. There's a separate item in #9201 to resolve polkadot db path properly.
arkpar
approved these changes
Aug 7, 2021
cheme
approved these changes
Aug 7, 2021
arkpar
added
the
D3-trivial 🧸
PR contains trivial changes in a runtime directory that do not require an audit
label
Aug 9, 2021
|
bot merge |
Trying merge. |
ghost
deleted the
auto_db
branch
August 9, 2021 13:22
JoshOrndorff
added a commit
to moonbeam-foundation/frontier
that referenced
this pull request
Aug 24, 2021
JoshOrndorff
added a commit
to moonbeam-foundation/frontier
that referenced
this pull request
Sep 16, 2021
JoshOrndorff
added a commit
to moonbeam-foundation/frontier
that referenced
this pull request
Sep 28, 2021
JoshOrndorff
added a commit
to moonbeam-foundation/frontier
that referenced
this pull request
Sep 28, 2021
This pull request was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
A0-please_review
Pull request needs code review.
C1-low
PR touches the given topic and has a low impact on builders.
D2-breaksapi
D3-trivial 🧸
PR contains trivial changes in a runtime directory that do not require an audit
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.
This pr introduces a
DatabaseSource
enum variant calledAuto
. (part of #9201)polkadot companion: paritytech/polkadot#3590
Auto
database backend is used for backward compatibility. It detects if rocksdb database already exists and uses it. Otherwise defaults to paritydb.changes:
kvdb-rocksdb
to0.13
parity-db
to0.3
DatabaseSettingsSrc
toDatabaseSource
and remove it's aliasservice::config::DatabaseConfig
DatabaseSource
variantAuto
which always attempts to open existing rocksdb and if the database does not exist (or fails to open), it attempts to open (or create new) paritydbfn DatabaseSource::supports_ref_counting
totrait Database
and add default impl that returnsfalse