mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-19 21:04:41 +00:00
Backfill blob storage fix (#5119)
* store blobs in the correct db in backfill * add database migration * add migration file * remove log info suggesting deneb isn't schedule * add batching in blob migration
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
//! Utilities for managing database schema changes.
|
||||
mod migration_schema_v17;
|
||||
mod migration_schema_v18;
|
||||
mod migration_schema_v19;
|
||||
|
||||
use crate::beacon_chain::BeaconChainTypes;
|
||||
use crate::types::ChainSpec;
|
||||
@@ -69,6 +70,14 @@ pub fn migrate_schema<T: BeaconChainTypes>(
|
||||
let ops = migration_schema_v18::downgrade_from_v18::<T>(db.clone(), log)?;
|
||||
db.store_schema_version_atomically(to, ops)
|
||||
}
|
||||
(SchemaVersion(18), SchemaVersion(19)) => {
|
||||
let ops = migration_schema_v19::upgrade_to_v19::<T>(db.clone(), log)?;
|
||||
db.store_schema_version_atomically(to, ops)
|
||||
}
|
||||
(SchemaVersion(19), SchemaVersion(18)) => {
|
||||
let ops = migration_schema_v19::downgrade_from_v19::<T>(db.clone(), log)?;
|
||||
db.store_schema_version_atomically(to, ops)
|
||||
}
|
||||
// Anything else is an error.
|
||||
(_, _) => Err(HotColdDBError::UnsupportedSchemaVersion {
|
||||
target_version: to,
|
||||
|
||||
Reference in New Issue
Block a user