From 326f43d644009913570a45c9c6ca7ba1d800529b Mon Sep 17 00:00:00 2001 From: "Jeff Washington (jwash)" Date: Tue, 23 Aug 2022 09:18:48 -0500 Subject: [PATCH] don't mark ancient append vecs as dirty wrt clean (#27312) --- runtime/src/accounts_db.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/runtime/src/accounts_db.rs b/runtime/src/accounts_db.rs index 8882dcae303cb5..711687cb59f20c 100644 --- a/runtime/src/accounts_db.rs +++ b/runtime/src/accounts_db.rs @@ -6739,8 +6739,13 @@ impl AccountsDb { for (slot, storages) in storages.iter_range(..in_epoch_range_start) { if let Some(storages) = storages { storages.iter().for_each(|store| { - self.dirty_stores - .insert((slot, store.append_vec_id()), store.clone()); + if !is_ancient(&store.accounts) { + // ancient stores are managed separately - we expect them to be old and keeping accounts + // We can expect the normal processes will keep them cleaned. + // If we included them here then ALL accounts in ALL ancient append vecs will be visited by clean each time. + self.dirty_stores + .insert((slot, store.append_vec_id()), store.clone()); + } }); } }