Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor data structure representing account candidates for cleaning (#…
…2296) * Refactor data structure representing account candidates for cleaning AccountsDB::clean_accounts makes unnecessary copies of large number of pubkeys and accompanying information to find and operate on the accounts that can be deleted from the accounts index. With this change the candidates for deletion are organized in a single data structure with necessary information being updated in-place, thus reducing memory requirements of the cleaning procedure. * Remove redundant method of CleaningInfo and make its fields private * Rework pubkey_to_slot_set construction * Use slice instead of Vec in parameter types * Remove redundant duplicate expression * Fix tests build * Replace Vec by Box * Fix clippy error * Add missing expect() message * Update expect message * Remove unnecessary check for empty bins * Remove redundant type specification * Formatting fixes * Exclude accounts with empty slot list * Fix name in an info message * Call scan once per pubkey * Fix deadlock in test * Remove redundant variable * Find affected pubkey in all bins * Undo BINS_FOR_TESTING change * Avoid acquiring read lock twice in same thread * comments * comments * replace if-then-else by then_some * Don't retain entries with empty slot list * add filtering on store counts loop * fix fmting on scan_accounts * extract out count_pubkeys * extract out `insert_pubkey` * fix fmt on `retain` * Remove hashset_to_vec timer * comments --------- Co-authored-by: jeff washington <[email protected]>
- Loading branch information