Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
Returns IntMap from select_candidates_by_total_usage() (#33976)
Browse files Browse the repository at this point in the history
  • Loading branch information
brooksprumo authored Nov 8, 2023
1 parent 783f136 commit bba6ea2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions accounts-db/src/accounts_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ use {
serde::{Deserialize, Serialize},
smallvec::SmallVec,
solana_measure::{measure::Measure, measure_us},
solana_nohash_hasher::IntSet,
solana_nohash_hasher::{IntMap, IntSet},
solana_rayon_threadlimit::get_thread_count,
solana_sdk::{
account::{Account, AccountSharedData, ReadableAccount, WritableAccount},
Expand Down Expand Up @@ -4328,7 +4328,7 @@ impl AccountsDb {
shrink_slots: &ShrinkCandidates,
shrink_ratio: f64,
oldest_non_ancient_slot: Option<Slot>,
) -> (HashMap<Slot, Arc<AccountStorageEntry>>, ShrinkCandidates) {
) -> (IntMap<Slot, Arc<AccountStorageEntry>>, ShrinkCandidates) {
struct StoreUsageInfo {
slot: Slot,
alive_ratio: f64,
Expand Down Expand Up @@ -4371,7 +4371,7 @@ impl AccountsDb {

// 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.
let mut shrink_slots = HashMap::new();
let mut shrink_slots = IntMap::default();
let mut shrink_slots_next_batch = ShrinkCandidates::default();
for usage in &store_usage {
let store = &usage.store;
Expand Down

0 comments on commit bba6ea2

Please sign in to comment.