Skip to content

Commit

Permalink
allow shrinking to be in progress during scan_account_storage
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffwashington committed Jul 20, 2023
1 parent 7f2f013 commit 1954410
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion runtime/src/accounts_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4942,7 +4942,8 @@ impl AccountsDb {
// If the slot is not in the cache, then all the account information must have
// been flushed. This is guaranteed because we only remove the rooted slot from
// the cache *after* we've finished flushing in `flush_slot_cache`.
if let Some(storage) = self.storage.get_slot_storage_entry(slot) {
// Scanning is occurring in the foreground, so shrinking could be running in the background.
if let Some(storage) = self.storage.get_slot_storage_entry_shrinking_in_progress_ok(slot) {
storage
.accounts
.account_iter()
Expand Down

0 comments on commit 1954410

Please sign in to comment.