add comment (#31252)

This commit is contained in:
Jeff Washington (jwash) 2023-04-18 15:13:57 -05:00 committed by GitHub
parent 30b62c0e1e
commit fb4b5c4fb8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -4023,6 +4023,8 @@ impl AccountsDb {
.fetch_add(1, Ordering::Relaxed);
for pubkey in shrink_collect.unrefed_pubkeys {
if let Some(locked_entry) = self.accounts_index.get_account_read_entry(pubkey) {
// pubkeys in `unrefed_pubkeys` were unref'd in `shrink_collect` above under the assumption that we would shrink everything.
// Since shrink is not occurring, we need to addref the pubkeys to get the system back to the prior state since the account still exists at this slot.
locked_entry.addref();
}
}