accounts_index_bins to AccountsIndexConfig (#19257)

* accounts_index_bins to AccountsIndexConfig

* rename param bins -> config

* rename BINS_FOR* to ACCOUNTS_INDEX_CONFIG_FOR*
This commit is contained in:
Jeff Washington (jwash)
2021-08-17 14:50:01 -05:00
committed by GitHub
parent 2c648cc6b6
commit 7c70f2158b
17 changed files with 549 additions and 64 deletions

View File

@@ -4,7 +4,7 @@ use {
accounts_db::{
AccountShrinkThreshold, AccountStorageEntry, AccountsDb, AppendVecId, BankHashInfo,
},
accounts_index::AccountSecondaryIndexes,
accounts_index::{AccountSecondaryIndexes, AccountsIndexConfig},
ancestors::Ancestors,
append_vec::{AppendVec, StoredMetaWriteVersion},
bank::{Bank, BankFieldsToDeserialize, BankRc, Builtins},
@@ -197,7 +197,7 @@ pub(crate) fn bank_from_streams<R>(
limit_load_slot_count_from_snapshot: Option<usize>,
shrink_ratio: AccountShrinkThreshold,
verify_index: bool,
accounts_index_bins: Option<usize>,
accounts_index_config: Option<AccountsIndexConfig>,
) -> std::result::Result<Bank, Error>
where
R: Read,
@@ -235,7 +235,7 @@ where
limit_load_slot_count_from_snapshot,
shrink_ratio,
verify_index,
accounts_index_bins,
accounts_index_config,
)?;
Ok(bank)
}};
@@ -328,7 +328,7 @@ fn reconstruct_bank_from_fields<E>(
limit_load_slot_count_from_snapshot: Option<usize>,
shrink_ratio: AccountShrinkThreshold,
verify_index: bool,
accounts_index_bins: Option<usize>,
accounts_index_config: Option<AccountsIndexConfig>,
) -> Result<Bank, Error>
where
E: SerializableStorage + std::marker::Sync,
@@ -343,7 +343,7 @@ where
limit_load_slot_count_from_snapshot,
shrink_ratio,
verify_index,
accounts_index_bins,
accounts_index_config,
)?;
accounts_db.freeze_accounts(
&Ancestors::from(&bank_fields.ancestors),
@@ -395,7 +395,7 @@ fn reconstruct_accountsdb_from_fields<E>(
limit_load_slot_count_from_snapshot: Option<usize>,
shrink_ratio: AccountShrinkThreshold,
verify_index: bool,
accounts_index_bins: Option<usize>,
accounts_index_config: Option<AccountsIndexConfig>,
) -> Result<AccountsDb, Error>
where
E: SerializableStorage + std::marker::Sync,
@@ -406,7 +406,7 @@ where
account_secondary_indexes,
caching_enabled,
shrink_ratio,
accounts_index_bins,
accounts_index_config,
);
let AccountsDbFields(