Returns IntMap from select_candidates_by_total_usage() (#33976)
This commit is contained in:
parent
783f136214
commit
bba6ea2d69
|
@ -81,7 +81,7 @@ use {
|
||||||
serde::{Deserialize, Serialize},
|
serde::{Deserialize, Serialize},
|
||||||
smallvec::SmallVec,
|
smallvec::SmallVec,
|
||||||
solana_measure::{measure::Measure, measure_us},
|
solana_measure::{measure::Measure, measure_us},
|
||||||
solana_nohash_hasher::IntSet,
|
solana_nohash_hasher::{IntMap, IntSet},
|
||||||
solana_rayon_threadlimit::get_thread_count,
|
solana_rayon_threadlimit::get_thread_count,
|
||||||
solana_sdk::{
|
solana_sdk::{
|
||||||
account::{Account, AccountSharedData, ReadableAccount, WritableAccount},
|
account::{Account, AccountSharedData, ReadableAccount, WritableAccount},
|
||||||
|
@ -4328,7 +4328,7 @@ impl AccountsDb {
|
||||||
shrink_slots: &ShrinkCandidates,
|
shrink_slots: &ShrinkCandidates,
|
||||||
shrink_ratio: f64,
|
shrink_ratio: f64,
|
||||||
oldest_non_ancient_slot: Option<Slot>,
|
oldest_non_ancient_slot: Option<Slot>,
|
||||||
) -> (HashMap<Slot, Arc<AccountStorageEntry>>, ShrinkCandidates) {
|
) -> (IntMap<Slot, Arc<AccountStorageEntry>>, ShrinkCandidates) {
|
||||||
struct StoreUsageInfo {
|
struct StoreUsageInfo {
|
||||||
slot: Slot,
|
slot: Slot,
|
||||||
alive_ratio: f64,
|
alive_ratio: f64,
|
||||||
|
@ -4371,7 +4371,7 @@ impl AccountsDb {
|
||||||
|
|
||||||
// Working from the beginning of store_usage which are the most sparse and see when we can stop
|
// Working from the beginning of store_usage which are the most sparse and see when we can stop
|
||||||
// shrinking while still achieving the overall goals.
|
// shrinking while still achieving the overall goals.
|
||||||
let mut shrink_slots = HashMap::new();
|
let mut shrink_slots = IntMap::default();
|
||||||
let mut shrink_slots_next_batch = ShrinkCandidates::default();
|
let mut shrink_slots_next_batch = ShrinkCandidates::default();
|
||||||
for usage in &store_usage {
|
for usage in &store_usage {
|
||||||
let store = &usage.store;
|
let store = &usage.store;
|
||||||
|
|
Loading…
Reference in New Issue