Moves in_mem_accounts_index.rs into accounts_index directory (#35360)
This commit is contained in:
parent
c9c2fbbdd6
commit
83de6a5930
|
@ -41,10 +41,11 @@ use {
|
||||||
ZeroLamportAccounts,
|
ZeroLamportAccounts,
|
||||||
},
|
},
|
||||||
accounts_index::{
|
accounts_index::{
|
||||||
AccountMapEntry, AccountSecondaryIndexes, AccountsIndex, AccountsIndexConfig,
|
in_mem_accounts_index::StartupStats, AccountMapEntry, AccountSecondaryIndexes,
|
||||||
AccountsIndexRootsStats, AccountsIndexScanResult, DiskIndexValue, IndexKey, IndexValue,
|
AccountsIndex, AccountsIndexConfig, AccountsIndexRootsStats, AccountsIndexScanResult,
|
||||||
IsCached, RefCount, ScanConfig, ScanResult, SlotList, UpsertReclaim, ZeroLamport,
|
DiskIndexValue, IndexKey, IndexValue, IsCached, RefCount, ScanConfig, ScanResult,
|
||||||
ACCOUNTS_INDEX_CONFIG_FOR_BENCHMARKS, ACCOUNTS_INDEX_CONFIG_FOR_TESTING,
|
SlotList, UpsertReclaim, ZeroLamport, ACCOUNTS_INDEX_CONFIG_FOR_BENCHMARKS,
|
||||||
|
ACCOUNTS_INDEX_CONFIG_FOR_TESTING,
|
||||||
},
|
},
|
||||||
accounts_index_storage::Startup,
|
accounts_index_storage::Startup,
|
||||||
accounts_partition::RentPayingAccountsByPartition,
|
accounts_partition::RentPayingAccountsByPartition,
|
||||||
|
@ -62,7 +63,6 @@ use {
|
||||||
},
|
},
|
||||||
contains::Contains,
|
contains::Contains,
|
||||||
epoch_accounts_hash::EpochAccountsHashManager,
|
epoch_accounts_hash::EpochAccountsHashManager,
|
||||||
in_mem_accounts_index::StartupStats,
|
|
||||||
partitioned_rewards::{PartitionedEpochRewardsConfig, TestPartitionedEpochRewards},
|
partitioned_rewards::{PartitionedEpochRewardsConfig, TestPartitionedEpochRewards},
|
||||||
pubkey_bins::PubkeyBinCalculator24,
|
pubkey_bins::PubkeyBinCalculator24,
|
||||||
read_only_accounts_cache::ReadOnlyAccountsCache,
|
read_only_accounts_cache::ReadOnlyAccountsCache,
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
pub(crate) mod in_mem_accounts_index;
|
||||||
use {
|
use {
|
||||||
crate::{
|
crate::{
|
||||||
accounts_index_storage::{AccountsIndexStorage, Startup},
|
accounts_index_storage::{AccountsIndexStorage, Startup},
|
||||||
|
@ -5,13 +6,13 @@ use {
|
||||||
ancestors::Ancestors,
|
ancestors::Ancestors,
|
||||||
bucket_map_holder::{Age, AtomicAge, BucketMapHolder},
|
bucket_map_holder::{Age, AtomicAge, BucketMapHolder},
|
||||||
contains::Contains,
|
contains::Contains,
|
||||||
in_mem_accounts_index::{InMemAccountsIndex, InsertNewEntryResults, StartupStats},
|
|
||||||
inline_spl_token::{self, GenericTokenAccount},
|
inline_spl_token::{self, GenericTokenAccount},
|
||||||
inline_spl_token_2022,
|
inline_spl_token_2022,
|
||||||
pubkey_bins::PubkeyBinCalculator24,
|
pubkey_bins::PubkeyBinCalculator24,
|
||||||
rolling_bit_field::RollingBitField,
|
rolling_bit_field::RollingBitField,
|
||||||
secondary_index::*,
|
secondary_index::*,
|
||||||
},
|
},
|
||||||
|
in_mem_accounts_index::{InMemAccountsIndex, InsertNewEntryResults, StartupStats},
|
||||||
log::*,
|
log::*,
|
||||||
rand::{thread_rng, Rng},
|
rand::{thread_rng, Rng},
|
||||||
rayon::{
|
rayon::{
|
||||||
|
|
|
@ -326,7 +326,7 @@ impl<T: IndexValue, U: DiskIndexValue + From<T> + Into<T>> InMemAccountsIndex<T,
|
||||||
|
|
||||||
/// lookup 'pubkey' in index (in_mem or disk).
|
/// lookup 'pubkey' in index (in_mem or disk).
|
||||||
/// call 'callback' whether found or not
|
/// call 'callback' whether found or not
|
||||||
pub(crate) fn get_internal_inner<RT>(
|
pub(super) fn get_internal_inner<RT>(
|
||||||
&self,
|
&self,
|
||||||
pubkey: &K,
|
pubkey: &K,
|
||||||
// return true if item should be added to in_mem cache
|
// return true if item should be added to in_mem cache
|
||||||
|
@ -339,7 +339,7 @@ impl<T: IndexValue, U: DiskIndexValue + From<T> + Into<T>> InMemAccountsIndex<T,
|
||||||
|
|
||||||
/// lookup 'pubkey' in the index (in_mem or disk).
|
/// lookup 'pubkey' in the index (in_mem or disk).
|
||||||
/// call 'callback' whether found or not
|
/// call 'callback' whether found or not
|
||||||
pub(crate) fn get_internal_cloned<RT>(
|
pub(super) fn get_internal_cloned<RT>(
|
||||||
&self,
|
&self,
|
||||||
pubkey: &K,
|
pubkey: &K,
|
||||||
callback: impl for<'a> FnOnce(Option<AccountMapEntry<T>>) -> RT,
|
callback: impl for<'a> FnOnce(Option<AccountMapEntry<T>>) -> RT,
|
||||||
|
@ -359,7 +359,7 @@ impl<T: IndexValue, U: DiskIndexValue + From<T> + Into<T>> InMemAccountsIndex<T,
|
||||||
/// then the disk entry *must* also be added to the in-mem cache.
|
/// then the disk entry *must* also be added to the in-mem cache.
|
||||||
///
|
///
|
||||||
/// Prefer `get_internal_inner()` or `get_internal_cloned()` for safe alternatives.
|
/// Prefer `get_internal_inner()` or `get_internal_cloned()` for safe alternatives.
|
||||||
pub(crate) fn get_internal<RT>(
|
pub(super) fn get_internal<RT>(
|
||||||
&self,
|
&self,
|
||||||
pubkey: &K,
|
pubkey: &K,
|
||||||
// return true if item should be added to in_mem cache
|
// return true if item should be added to in_mem cache
|
|
@ -1,8 +1,10 @@
|
||||||
use {
|
use {
|
||||||
crate::{
|
crate::{
|
||||||
accounts_index::{AccountsIndexConfig, DiskIndexValue, IndexValue},
|
accounts_index::{
|
||||||
|
in_mem_accounts_index::InMemAccountsIndex, AccountsIndexConfig, DiskIndexValue,
|
||||||
|
IndexValue,
|
||||||
|
},
|
||||||
bucket_map_holder::BucketMapHolder,
|
bucket_map_holder::BucketMapHolder,
|
||||||
in_mem_accounts_index::InMemAccountsIndex,
|
|
||||||
waitable_condvar::WaitableCondvar,
|
waitable_condvar::WaitableCondvar,
|
||||||
},
|
},
|
||||||
std::{
|
std::{
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
use {
|
use {
|
||||||
crate::{
|
crate::{
|
||||||
accounts_index::{AccountsIndexConfig, DiskIndexValue, IndexLimitMb, IndexValue},
|
accounts_index::{
|
||||||
|
in_mem_accounts_index::{InMemAccountsIndex, StartupStats},
|
||||||
|
AccountsIndexConfig, DiskIndexValue, IndexLimitMb, IndexValue,
|
||||||
|
},
|
||||||
bucket_map_holder_stats::BucketMapHolderStats,
|
bucket_map_holder_stats::BucketMapHolderStats,
|
||||||
in_mem_accounts_index::{InMemAccountsIndex, StartupStats},
|
|
||||||
waitable_condvar::WaitableCondvar,
|
waitable_condvar::WaitableCondvar,
|
||||||
},
|
},
|
||||||
solana_bucket_map::bucket_map::{BucketMap, BucketMapConfig},
|
solana_bucket_map::bucket_map::{BucketMap, BucketMapConfig},
|
||||||
|
|
|
@ -27,7 +27,6 @@ pub mod cache_hash_data_stats;
|
||||||
pub mod contains;
|
pub mod contains;
|
||||||
pub mod epoch_accounts_hash;
|
pub mod epoch_accounts_hash;
|
||||||
pub mod hardened_unpack;
|
pub mod hardened_unpack;
|
||||||
pub mod in_mem_accounts_index;
|
|
||||||
pub mod inline_spl_token;
|
pub mod inline_spl_token;
|
||||||
pub mod inline_spl_token_2022;
|
pub mod inline_spl_token_2022;
|
||||||
pub mod partitioned_rewards;
|
pub mod partitioned_rewards;
|
||||||
|
|
Loading…
Reference in New Issue