Skip to content

Commit

Permalink
Uses file io as default method to access account storages (#4365)
Browse files Browse the repository at this point in the history
  • Loading branch information
brooksprumo authored Jan 10, 2025
1 parent f07a570 commit 8cc2ee3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Release channels have their own copy of this changelog:
* Changes
* CLI:
* Add global `--skip-preflight` option for skipping preflight checks on all transactions sent through RPC. This flag, along with `--use-rpc`, can improve success rate with program deployments using the public RPC nodes.
* Unhide `--accounts-db-access-storages-method` for agave-validator and agave-ledger-tool
* Unhide `--accounts-db-access-storages-method` for agave-validator and agave-ledger-tool and change default to `file`
* Remove tracer stats from banking-trace. `banking-trace` directory should be cleared when restarting on v2.2 for first time. It will not break if not cleared, but the file will be a mix of new/old format. (#4043)

## [2.1.0]
Expand Down
4 changes: 2 additions & 2 deletions accounts-db/src/accounts_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ pub const ACCOUNTS_DB_CONFIG_FOR_TESTING: AccountsDbConfig = AccountsDbConfig {
create_ancient_storage: CreateAncientStorage::Pack,
partitioned_epoch_rewards_config: DEFAULT_PARTITIONED_EPOCH_REWARDS_CONFIG,
test_skip_rewrites_but_include_in_bank_hash: false,
storage_access: StorageAccess::Mmap,
storage_access: StorageAccess::File,
scan_filter_for_shrinking: ScanFilter::OnlyAbnormalWithVerify,
enable_experimental_accumulator_hash: false,
verify_experimental_accumulator_hash: false,
Expand All @@ -538,7 +538,7 @@ pub const ACCOUNTS_DB_CONFIG_FOR_BENCHMARKS: AccountsDbConfig = AccountsDbConfig
create_ancient_storage: CreateAncientStorage::Pack,
partitioned_epoch_rewards_config: DEFAULT_PARTITIONED_EPOCH_REWARDS_CONFIG,
test_skip_rewrites_but_include_in_bank_hash: false,
storage_access: StorageAccess::Mmap,
storage_access: StorageAccess::File,
scan_filter_for_shrinking: ScanFilter::OnlyAbnormalWithVerify,
enable_experimental_accumulator_hash: false,
verify_experimental_accumulator_hash: false,
Expand Down
3 changes: 2 additions & 1 deletion accounts-db/src/accounts_file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,11 @@ pub enum MatchAccountOwnerError {

#[derive(Debug, Default, Clone, Copy, PartialEq, Eq)]
pub enum StorageAccess {
#[default]
/// storages should be accessed by Mmap
Mmap,
/// storages should be accessed by File I/O
/// ancient storages are created by 1-shot write to pack multiple accounts together more efficiently with new formats
#[default]
File,
}

Expand Down

0 comments on commit 8cc2ee3

Please sign in to comment.