diff --git a/runtime/src/accounts_db.rs b/runtime/src/accounts_db.rs index cca30c0c867fa0..154613e3006687 100644 --- a/runtime/src/accounts_db.rs +++ b/runtime/src/accounts_db.rs @@ -97,7 +97,6 @@ use { borrow::{Borrow, Cow}, boxed::Box, collections::{hash_map, BTreeSet, HashMap, HashSet}, - fs, hash::{Hash as StdHash, Hasher as StdHasher}, io::Result as IoResult, ops::{Range, RangeBounds}, @@ -1396,10 +1395,20 @@ pub struct AccountsDb { /// Set of storage paths to pick from pub(crate) paths: Vec, +<<<<<<< HEAD:runtime/src/accounts_db.rs /// Directories for account hash calculations, within base_working_path full_accounts_hash_cache_path: PathBuf, incremental_accounts_hash_cache_path: PathBuf, transient_accounts_hash_cache_path: PathBuf, +======= + /// Base directory for various necessary files + base_working_path: PathBuf, + // used by tests - held until we are dropped + #[allow(dead_code)] + base_working_temp_dir: Option, + + accounts_hash_cache_path: PathBuf, +>>>>>>> c61ee20b44 (Transient accounts hash cache dir is unnecessary (#33181)):accounts-db/src/accounts_db.rs // used by tests // holds this until we are dropped @@ -2402,10 +2411,16 @@ impl AccountsDb { write_cache_limit_bytes: None, write_version: AtomicU64::new(0), paths: vec![], +<<<<<<< HEAD:runtime/src/accounts_db.rs full_accounts_hash_cache_path: accounts_hash_cache_path.join("full"), incremental_accounts_hash_cache_path: accounts_hash_cache_path.join("incremental"), transient_accounts_hash_cache_path: accounts_hash_cache_path.join("transient"), temp_accounts_hash_cache_path, +======= + base_working_path, + base_working_temp_dir, + accounts_hash_cache_path, +>>>>>>> c61ee20b44 (Transient accounts hash cache dir is unnecessary (#33181)):accounts-db/src/accounts_db.rs shrink_paths: RwLock::new(None), temp_paths: None, file_size: DEFAULT_FILE_SIZE, @@ -7595,6 +7610,14 @@ impl AccountsDb { let slot = storages.max_slot_inclusive(); let use_bg_thread_pool = config.use_bg_thread_pool; +<<<<<<< HEAD:runtime/src/accounts_db.rs +======= + let accounts_hash_cache_path = self.accounts_hash_cache_path.clone(); + let transient_accounts_hash_cache_dir = TempDir::new_in(&accounts_hash_cache_path) + .expect("create transient accounts hash cache dir"); + let transient_accounts_hash_cache_path = + transient_accounts_hash_cache_dir.path().to_path_buf(); +>>>>>>> c61ee20b44 (Transient accounts hash cache dir is unnecessary (#33181)):accounts-db/src/accounts_db.rs let scan_and_hash = || { let cache_hash_data = Self::get_cache_hash_data(accounts_hash_cache_path, config, slot); @@ -7603,16 +7626,20 @@ impl AccountsDb { end: PUBKEY_BINS_FOR_CALCULATING_HASHES, }; - fs::create_dir_all(&self.transient_accounts_hash_cache_path) - .expect("create transient accounts hash cache dir"); let accounts_hasher = AccountsHasher { filler_account_suffix: if self.filler_accounts_config.count > 0 { self.filler_account_suffix } else { None }, +<<<<<<< HEAD:runtime/src/accounts_db.rs zero_lamport_accounts: flavor.zero_lamport_accounts(), dir_for_temp_cache_files: self.transient_accounts_hash_cache_path.clone(), +======= + zero_lamport_accounts: kind.zero_lamport_accounts(), + dir_for_temp_cache_files: transient_accounts_hash_cache_path, + active_stats: &self.active_stats, +>>>>>>> c61ee20b44 (Transient accounts hash cache dir is unnecessary (#33181)):accounts-db/src/accounts_db.rs }; // get raw data by scanning