mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-20 19:45:41 +00:00
paritydb support for parachains db. (#4838)
* parity db subsystem without cache and no splitted column * fmt * fix path (auto from parity-db fail) * lru cache for db column with cache * Revert "lru cache for db column with cache" This reverts commit ae177bc5e107a075eff6a21f651218ada6599b74. * Write_lock mutex * theoric code for bridges * revert changes * Revert bridge changes * fix spec_version * update parity db * test purge-db * Use specific ordered collection with paritydb. * Revert "Use specific ordered collection with paritydb." This reverts commit 8b66d0a4ae914cba1af0f44050d45dd6d9327c6b. * fix chain selection tests. * remove patch * fix auto. * Remove useless exists directory method * purge chain without parity-db removal * spellcheck * renamings and filtering. * fix assertion * format * update parity-db and fmt * Auto keep using rocksdb when it exists. * Revert "Auto keep using rocksdb when it exists." This reverts commit cea49b32ae590bdce31fed5c45f3c028ae0c7564. * Update kvdb version.
This commit is contained in:
@@ -856,10 +856,31 @@ where
|
||||
);
|
||||
}
|
||||
|
||||
let parachains_db = crate::parachains_db::open_creating(
|
||||
config.database.path().ok_or(Error::DatabasePathRequired)?.into(),
|
||||
crate::parachains_db::CacheSizes::default(),
|
||||
)?;
|
||||
let parachains_db = match &config.database {
|
||||
DatabaseSource::RocksDb { path, .. } => crate::parachains_db::open_creating_rocksdb(
|
||||
path.clone(),
|
||||
crate::parachains_db::CacheSizes::default(),
|
||||
)?,
|
||||
DatabaseSource::ParityDb { path, .. } => crate::parachains_db::open_creating_paritydb(
|
||||
path.parent().ok_or(Error::DatabasePathRequired)?.into(),
|
||||
crate::parachains_db::CacheSizes::default(),
|
||||
)?,
|
||||
DatabaseSource::Auto { paritydb_path, rocksdb_path, .. } =>
|
||||
if paritydb_path.is_dir() && paritydb_path.exists() {
|
||||
crate::parachains_db::open_creating_paritydb(
|
||||
paritydb_path.parent().ok_or(Error::DatabasePathRequired)?.into(),
|
||||
crate::parachains_db::CacheSizes::default(),
|
||||
)?
|
||||
} else {
|
||||
crate::parachains_db::open_creating_rocksdb(
|
||||
rocksdb_path.clone(),
|
||||
crate::parachains_db::CacheSizes::default(),
|
||||
)?
|
||||
},
|
||||
DatabaseSource::Custom { .. } => {
|
||||
unimplemented!("No polkadot subsystem db for custom source.");
|
||||
},
|
||||
};
|
||||
|
||||
let availability_config = AvailabilityConfig {
|
||||
col_data: crate::parachains_db::REAL_COLUMNS.col_availability_data,
|
||||
|
||||
Reference in New Issue
Block a user