remove storages that only contain empty (#27452)

This commit is contained in:
Jeff Washington (jwash) 2022-08-30 14:04:17 -05:00 committed by GitHub
parent 1154bc8636
commit 2e4a52d010
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 0 deletions

View File

@ -4052,6 +4052,16 @@ impl AccountsDb {
self.accounts_index
.clean_dead_slot(*slot, &mut AccountsIndexRootsStats::default());
self.bank_hashes.write().unwrap().remove(slot);
// all storages have been removed from here and recycled or dropped
assert!(self
.storage
.map
.remove(slot)
.unwrap()
.1
.read()
.unwrap()
.is_empty());
});
}