Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Conversation

@debris
Copy link
Contributor

@debris debris commented Aug 4, 2021

This pr introduces a DatabaseSource enum variant called Auto. (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:

  • bump kvdb-rocksdb to 0.13
  • bump parity-db to 0.3
  • rename DatabaseSettingsSrc to DatabaseSource and remove it's alias service::config::DatabaseConfig
  • introduce new DatabaseSource variant Auto 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) paritydb
  • move fn DatabaseSource::supports_ref_counting to trait Database and add default impl that returns false
  • added tests

@debris 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
@debris debris requested review from arkpar and cheme August 4, 2021 17:27
@arkpar
Copy link
Member

arkpar commented Aug 4, 2021

Just want to make sure default CLI options is still RocksDb. We don't want to activate parity-db by default for everyone yet, before #9201 is complete. Needs some testing on validators first.

@debris
Copy link
Contributor Author

debris commented Aug 6, 2021

Just want to make sure default CLI options is still RocksDb. We don't want to activate parity-db by default for everyone yet, before #9201 is complete. Needs some testing on validators first.

Default cli option remains unchanged rocksdb

//
// 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),
Copy link
Member

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 arkpar added the D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit label Aug 9, 2021
@debris
Copy link
Contributor Author

debris commented Aug 9, 2021

gitlab-unleash-check is failure is unrelated to this pr

@arkpar
Copy link
Member

arkpar commented Aug 9, 2021

bot merge

@ghost
Copy link

ghost commented Aug 9, 2021

Trying merge.

@ghost ghost merged commit b9d86e1 into master Aug 9, 2021
@ghost 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
bkchr added a commit that referenced this pull request Oct 8, 2021
bkchr added a commit that referenced this pull request Oct 8, 2021
bkchr added a commit that referenced this pull request Oct 8, 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants