You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Deletes DB columns that are not needed in the new chain.fnfinalize(&self,near_config:&mutNearConfig,home_dir:&Path) -> anyhow::Result<()>{// Open storage with migrationlet storage = open_storage(&home_dir, near_config).unwrap();let store = storage.get_hot_store();
tracing::info!("Delete unneeded columns in the original DB");letmut update = store.store_update();for col inDBCol::iter(){match col {DBCol::DbVersion | DBCol::Misc | DBCol::State | DBCol::FlatState => {}
_ => update.delete_all(col),}}
update.commit()?;Ok(())}
Deleting the columns probably do not save a ton of space, or at least would need a lengthy compaction step. Instead, we can do the following:
Copy DbVersion, Misc, and FlatState to a separate database
Copy only the values in State (not the nodes) to this separate database
Swap the new database in place.
With new research, this process should take about only 2 minutes to complete, and should leave a database that is quite tiny in size (30GB ish?)
The text was updated successfully, but these errors were encountered:
In the fork-network code:
Deleting the columns probably do not save a ton of space, or at least would need a lengthy compaction step. Instead, we can do the following:
With new research, this process should take about only 2 minutes to complete, and should leave a database that is quite tiny in size (30GB ish?)
The text was updated successfully, but these errors were encountered: