take mutex once in process_dead_slots (#17357)

This commit is contained in:
Jeff Washington (jwash) 2021-05-20 19:50:58 -05:00 committed by GitHub
parent a1a0d6f84b
commit 45552d271a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -1895,8 +1895,11 @@ impl AccountsDb {
// If the slot is dead, remove the need to shrink the storages as // If the slot is dead, remove the need to shrink the storages as
// the storage entries will be purged. // the storage entries will be purged.
for slot in dead_slots { {
self.shrink_candidate_slots.lock().unwrap().remove(slot); let mut list = self.shrink_candidate_slots.lock().unwrap();
for slot in dead_slots {
list.remove(slot);
}
} }
debug!( debug!(