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

Commit

Permalink
simple refactorings to disk idx
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffwashington committed Aug 18, 2022
1 parent 0b54b22 commit 2b9252f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion runtime/src/accounts_index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,8 @@ impl<T: IndexValue> PreAllocatedAccountMapEntry<T> {
account_info: T,
storage: &Arc<BucketMapHolder<T>>,
) -> AccountMapEntry<T> {
let ref_count = if account_info.is_cached() { 0 } else { 1 };
let is_cached = account_info.is_cached();
let ref_count = if is_cached { 0 } else { 1 };
let meta = AccountMapEntryMeta::new_dirty(storage);
Arc::new(AccountMapEntryInner::new(
vec![(slot, account_info)],
Expand Down
1 change: 1 addition & 0 deletions runtime/src/bucket_map_holder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ pub struct BucketMapHolder<T: IndexValue> {
pub disk: Option<BucketMap<(Slot, T)>>,

pub count_buckets_flushed: AtomicUsize,
/// rolling 'current' age
pub age: AtomicU8,
pub stats: BucketMapHolderStats,

Expand Down

0 comments on commit 2b9252f

Please sign in to comment.