add file_provider to accounts_db (#665)
This commit is contained in:
parent
6fedfe5a4d
commit
8e0a55fe64
|
@ -1424,6 +1424,9 @@ pub struct AccountsDb {
|
||||||
/// debug feature to scan every append vec and verify refcounts are equal
|
/// debug feature to scan every append vec and verify refcounts are equal
|
||||||
exhaustively_verify_refcounts: bool,
|
exhaustively_verify_refcounts: bool,
|
||||||
|
|
||||||
|
/// storage format to use for new storages
|
||||||
|
accounts_file_provider: AccountsFileProvider,
|
||||||
|
|
||||||
/// this will live here until the feature for partitioned epoch rewards is activated.
|
/// this will live here until the feature for partitioned epoch rewards is activated.
|
||||||
/// At that point, this and other code can be deleted.
|
/// At that point, this and other code can be deleted.
|
||||||
pub partitioned_epoch_rewards_config: PartitionedEpochRewardsConfig,
|
pub partitioned_epoch_rewards_config: PartitionedEpochRewardsConfig,
|
||||||
|
@ -2404,6 +2407,7 @@ impl AccountsDb {
|
||||||
accounts_update_notifier: None,
|
accounts_update_notifier: None,
|
||||||
log_dead_slots: AtomicBool::new(true),
|
log_dead_slots: AtomicBool::new(true),
|
||||||
exhaustively_verify_refcounts: false,
|
exhaustively_verify_refcounts: false,
|
||||||
|
accounts_file_provider: AccountsFileProvider::default(),
|
||||||
partitioned_epoch_rewards_config: PartitionedEpochRewardsConfig::default(),
|
partitioned_epoch_rewards_config: PartitionedEpochRewardsConfig::default(),
|
||||||
epoch_accounts_hash_manager: EpochAccountsHashManager::new_invalid(),
|
epoch_accounts_hash_manager: EpochAccountsHashManager::new_invalid(),
|
||||||
test_skip_rewrites_but_include_in_bank_hash: false,
|
test_skip_rewrites_but_include_in_bank_hash: false,
|
||||||
|
@ -2546,7 +2550,7 @@ impl AccountsDb {
|
||||||
slot,
|
slot,
|
||||||
self.next_id(),
|
self.next_id(),
|
||||||
size,
|
size,
|
||||||
AccountsFileProvider::AppendVec,
|
self.accounts_file_provider,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -294,8 +294,9 @@ impl<'a> Iterator for AccountsFileIter<'a> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// An enum that creates AccountsFile instance with the specified format.
|
/// An enum that creates AccountsFile instance with the specified format.
|
||||||
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
|
#[derive(Debug, Default, Copy, Clone, Eq, PartialEq)]
|
||||||
pub enum AccountsFileProvider {
|
pub enum AccountsFileProvider {
|
||||||
|
#[default]
|
||||||
AppendVec,
|
AppendVec,
|
||||||
HotStorage,
|
HotStorage,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue