From 19544103f46b25c1205694d4a3ed42f8074ebbfa Mon Sep 17 00:00:00 2001 From: jeff washington Date: Thu, 20 Jul 2023 08:23:16 -0500 Subject: [PATCH] allow shrinking to be in progress during `scan_account_storage` --- runtime/src/accounts_db.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/runtime/src/accounts_db.rs b/runtime/src/accounts_db.rs index a8ff9812f53da3..e4420554c7f1a8 100644 --- a/runtime/src/accounts_db.rs +++ b/runtime/src/accounts_db.rs @@ -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()