don't try to build secondary indexes if we don't need them (#17246)
This commit is contained in:
parent
8a574baae2
commit
d461aba6a4
|
@ -5054,6 +5054,7 @@ impl AccountsDb {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
drop(lock);
|
drop(lock);
|
||||||
|
if !self.account_indexes.is_empty() {
|
||||||
for (pubkey, account_infos) in accounts_map.into_iter() {
|
for (pubkey, account_infos) in accounts_map.into_iter() {
|
||||||
for (_, (_store_id, stored_account)) in account_infos.iter() {
|
for (_, (_store_id, stored_account)) in account_infos.iter() {
|
||||||
self.accounts_index.update_secondary_indexes(
|
self.accounts_index.update_secondary_indexes(
|
||||||
|
@ -5066,6 +5067,7 @@ impl AccountsDb {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
scan_time_sum
|
scan_time_sum
|
||||||
})
|
})
|
||||||
.sum();
|
.sum();
|
||||||
|
|
Loading…
Reference in New Issue