Do periodic inbound cleaning for rooted slots (#8436)

* Do periodic inbound compaction for rooted slots

* Add comment

* nits

* Consider not_compacted_roots in cleanup_dead_slot

* Renames in AccountsIndex

* Rename to reflect expansion of removed accounts

* Fix a comment

* rename

* Parallelize clean over AccountsIndex

* Some niceties

* Reduce locks and real chunked parallelism

* Measure each step for sampling opportunities

* Just noticed par iter is maybe lazy

* Replace storage scan with optimized index scan

* Various clean-ups

* Clear uncleared_roots even if no updates
This commit is contained in:
Ryo Onodera
2020-03-03 14:57:25 +09:00
committed by GitHub
parent 1265afebbb
commit d86103383a
4 changed files with 262 additions and 50 deletions

View File

@ -337,7 +337,7 @@ pub fn add_snapshot<P: AsRef<Path>>(
bank: &Bank,
snapshot_storages: &[SnapshotStorage],
) -> Result<SlotSnapshotPaths> {
bank.purge_zero_lamport_accounts();
bank.clean_accounts();
bank.update_accounts_hash();
let slot = bank.slot();
// snapshot_path/slot