From 8cc2ee3f8a6f06d1deaea074f36b9cb7b3631a67 Mon Sep 17 00:00:00 2001 From: Brooks Date: Fri, 10 Jan 2025 17:45:55 -0500 Subject: [PATCH] Uses file io as default method to access account storages (#4365) --- CHANGELOG.md | 2 +- accounts-db/src/accounts_db.rs | 4 ++-- accounts-db/src/accounts_file.rs | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 666e2c7cfa24b1..e40ad716dd1f58 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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] diff --git a/accounts-db/src/accounts_db.rs b/accounts-db/src/accounts_db.rs index e57b24b609304c..0a66a8c20ff846 100644 --- a/accounts-db/src/accounts_db.rs +++ b/accounts-db/src/accounts_db.rs @@ -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, @@ -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, diff --git a/accounts-db/src/accounts_file.rs b/accounts-db/src/accounts_file.rs index 196fccb9ac7bd5..37fea95845b3fc 100644 --- a/accounts-db/src/accounts_file.rs +++ b/accounts-db/src/accounts_file.rs @@ -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, }