periodically save config in separate folders
This commit is contained in:
committed by
Michael Vines
parent
07c183bb84
commit
8b41a5d725
@ -22,7 +22,6 @@ use std::collections::{HashMap, HashSet};
|
||||
use std::env;
|
||||
use std::fs::remove_dir_all;
|
||||
use std::io::{BufReader, Read};
|
||||
use std::iter::once;
|
||||
use std::ops::Neg;
|
||||
use std::path::Path;
|
||||
use std::sync::atomic::{AtomicUsize, Ordering};
|
||||
|
@ -39,7 +39,7 @@ use std::sync::atomic::{AtomicUsize, Ordering};
|
||||
use std::sync::{Arc, RwLock};
|
||||
use sys_info;
|
||||
|
||||
const ACCOUNT_DATA_FILE_SIZE: u64 = 64 * 1024 * 1024;
|
||||
const ACCOUNT_DATA_FILE_SIZE: u64 = 16 * 1024 * 1024;
|
||||
const ACCOUNT_DATA_FILE: &str = "data";
|
||||
pub const NUM_THREADS: u32 = 10;
|
||||
|
||||
@ -340,8 +340,9 @@ impl AccountsDB {
|
||||
let union = index.roots.union(&accounts_index.roots);
|
||||
index.roots = union.cloned().collect();
|
||||
index.last_root = accounts_index.last_root;
|
||||
let mut stores = self.storage.write().unwrap();
|
||||
stores.0.extend(storage.0);
|
||||
}
|
||||
*self.storage.write().unwrap() = storage;
|
||||
self.next_id
|
||||
.store(ids[ids.len() - 1] + 1, Ordering::Relaxed);
|
||||
self.write_version.store(version, Ordering::Relaxed);
|
||||
|
@ -4,7 +4,7 @@
|
||||
//! already been signed and verified.
|
||||
use crate::accounts::Accounts;
|
||||
use crate::accounts_db::{
|
||||
AccountsDB, ErrorCounters, InstructionAccounts, InstructionCredits, InstructionLoaders,
|
||||
ErrorCounters, InstructionAccounts, InstructionCredits, InstructionLoaders,
|
||||
};
|
||||
use crate::accounts_index::Fork;
|
||||
use crate::blockhash_queue::BlockhashQueue;
|
||||
|
Reference in New Issue
Block a user