From 8822aaa67e9dfd6daf92f3cbfdec30de981b27e3 Mon Sep 17 00:00:00 2001 From: Brooks Date: Thu, 28 Mar 2024 15:10:50 -0400 Subject: [PATCH] Do not purge all bank snapshots after fastboot (#345) --- ledger/src/bank_forks_utils.rs | 9 --------- 1 file changed, 9 deletions(-) diff --git a/ledger/src/bank_forks_utils.rs b/ledger/src/bank_forks_utils.rs index a64b29bdcf8670..50f8be8561cce9 100644 --- a/ledger/src/bank_forks_utils.rs +++ b/ledger/src/bank_forks_utils.rs @@ -297,15 +297,6 @@ fn bank_forks_from_snapshot( source: err, path: fastboot_snapshot.snapshot_path(), })?; - - // If the node crashes before taking the next bank snapshot, the next startup will attempt - // to load from the same bank snapshot again. And if `shrink` has run, the account storage - // files that are hard linked in bank snapshot will be *different* than what the bank - // snapshot expects. This would cause the node to crash again. To prevent that, purge all - // the bank snapshots here. In the above scenario, this will cause the node to load from a - // snapshot archive next time, which is safe. - snapshot_utils::purge_all_bank_snapshots(&snapshot_config.bank_snapshots_dir); - bank } else { // Given that we are going to boot from an archive, the append vecs held in the snapshot dirs for fast-boot should