Skip to content

Commit

Permalink
don't mark ancient append vecs as dirty wrt clean (solana-labs#27312)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffwashington authored Aug 23, 2022
1 parent 40ffb50 commit 326f43d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions runtime/src/accounts_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
});
}
}
Expand Down

0 comments on commit 326f43d

Please sign in to comment.