Improve database compaction and prune-states (#5142)

* Fix no-op state prune check

* Compact freezer DB after pruning

* Refine DB compaction

* Add blobs-db options to inspect/compact

* Better key size

* Fix compaction end key
This commit is contained in:
Michael Sproul
2024-02-08 21:05:08 +11:00
committed by GitHub
parent e470596715
commit 6f442f2bb8
5 changed files with 127 additions and 41 deletions

View File

@@ -2376,6 +2376,9 @@ impl<E: EthSpec, Hot: ItemStore<E>, Cold: ItemStore<E>> HotColdDB<E, Hot, Cold>
self.cold_db.do_atomically(cold_ops)?;
}
// In order to reclaim space, we need to compact the freezer DB as well.
self.cold_db.compact()?;
Ok(())
}
}