AcctIdx: combine if (#20545)

This commit is contained in:
Jeff Washington (jwash) 2021-10-10 13:48:18 -05:00 committed by GitHub
parent 33d8c07364
commit 8cf222b8bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 4 deletions

View File

@ -723,10 +723,9 @@ impl<T: IndexValue> InMemAccountsIndex<T> {
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);