From 8cf222b8bdf14fce235455b70fe3ad415deebba1 Mon Sep 17 00:00:00 2001 From: "Jeff Washington (jwash)" <75863576+jeffwashington@users.noreply.github.com> Date: Sun, 10 Oct 2021 13:48:18 -0500 Subject: [PATCH] AcctIdx: combine if (#20545) --- runtime/src/in_mem_accounts_index.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/runtime/src/in_mem_accounts_index.rs b/runtime/src/in_mem_accounts_index.rs index a5817116df..165aaaa4d5 100644 --- a/runtime/src/in_mem_accounts_index.rs +++ b/runtime/src/in_mem_accounts_index.rs @@ -723,10 +723,9 @@ impl InMemAccountsIndex { let m = Measure::start("flush_remove_or_grow"); match disk_resize { Ok(_) => { - if !self.flush_remove_from_cache(removes, current_age, startup, false) { - iterate_for_age = false; // did not make it all the way through this bucket, so didn't handle age completely - } - if !self.flush_remove_from_cache(removes_random, current_age, startup, true) { + if !self.flush_remove_from_cache(removes, current_age, startup, false) + || !self.flush_remove_from_cache(removes_random, current_age, startup, true) + { iterate_for_age = false; // did not make it all the way through this bucket, so didn't handle age completely } Self::update_time_stat(&self.stats().flush_remove_us, m);