Skip to content

Commit 8cc2ee3

Browse files
authored
Uses file io as default method to access account storages (#4365)
1 parent f07a570 commit 8cc2ee3

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Release channels have their own copy of this changelog:
1717
* Changes
1818
* CLI:
1919
* 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.
20-
* Unhide `--accounts-db-access-storages-method` for agave-validator and agave-ledger-tool
20+
* Unhide `--accounts-db-access-storages-method` for agave-validator and agave-ledger-tool and change default to `file`
2121
* 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)
2222

2323
## [2.1.0]

accounts-db/src/accounts_db.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ pub const ACCOUNTS_DB_CONFIG_FOR_TESTING: AccountsDbConfig = AccountsDbConfig {
511511
create_ancient_storage: CreateAncientStorage::Pack,
512512
partitioned_epoch_rewards_config: DEFAULT_PARTITIONED_EPOCH_REWARDS_CONFIG,
513513
test_skip_rewrites_but_include_in_bank_hash: false,
514-
storage_access: StorageAccess::Mmap,
514+
storage_access: StorageAccess::File,
515515
scan_filter_for_shrinking: ScanFilter::OnlyAbnormalWithVerify,
516516
enable_experimental_accumulator_hash: false,
517517
verify_experimental_accumulator_hash: false,
@@ -538,7 +538,7 @@ pub const ACCOUNTS_DB_CONFIG_FOR_BENCHMARKS: AccountsDbConfig = AccountsDbConfig
538538
create_ancient_storage: CreateAncientStorage::Pack,
539539
partitioned_epoch_rewards_config: DEFAULT_PARTITIONED_EPOCH_REWARDS_CONFIG,
540540
test_skip_rewrites_but_include_in_bank_hash: false,
541-
storage_access: StorageAccess::Mmap,
541+
storage_access: StorageAccess::File,
542542
scan_filter_for_shrinking: ScanFilter::OnlyAbnormalWithVerify,
543543
enable_experimental_accumulator_hash: false,
544544
verify_experimental_accumulator_hash: false,

accounts-db/src/accounts_file.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,11 @@ pub enum MatchAccountOwnerError {
5050

5151
#[derive(Debug, Default, Clone, Copy, PartialEq, Eq)]
5252
pub enum StorageAccess {
53-
#[default]
5453
/// storages should be accessed by Mmap
5554
Mmap,
55+
/// storages should be accessed by File I/O
5656
/// ancient storages are created by 1-shot write to pack multiple accounts together more efficiently with new formats
57+
#[default]
5758
File,
5859
}
5960

0 commit comments

Comments
 (0)