From 2ae1e80013ae3cd355a8003b843e8c9b2013a946 Mon Sep 17 00:00:00 2001 From: "Jeff Washington (jwash)" <75863576+jeffwashington@users.noreply.github.com> Date: Thu, 23 Sep 2021 17:33:54 -0500 Subject: [PATCH] AcctIdx: items needs to load from disk (#20138) --- runtime/src/in_mem_accounts_index.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/runtime/src/in_mem_accounts_index.rs b/runtime/src/in_mem_accounts_index.rs index 3c1a14e6a4..2e4462bd1a 100644 --- a/runtime/src/in_mem_accounts_index.rs +++ b/runtime/src/in_mem_accounts_index.rs @@ -83,6 +83,8 @@ impl InMemAccountsIndex { where R: RangeBounds + std::fmt::Debug, { + self.start_stop_flush(true); + self.put_range_in_cache(range); // check range here to see if our items are already held in the cache Self::update_stat(&self.stats().items, 1); let map = self.map().read().unwrap(); let mut result = Vec::with_capacity(map.len()); @@ -91,6 +93,7 @@ impl InMemAccountsIndex { result.push((*k, v.clone())); } }); + self.start_stop_flush(false); result }