add 'drives' to AccountsIndexConfig (#19989)

This commit is contained in:
Jeff Washington (jwash)
2021-09-18 09:54:57 -05:00
committed by GitHub
parent f500c99a6d
commit 4e038e94fd
3 changed files with 21 additions and 0 deletions

View File

@ -23,6 +23,7 @@ use std::{
Bound::{Excluded, Included, Unbounded},
Range, RangeBounds,
},
path::PathBuf,
sync::{
atomic::{AtomicBool, AtomicU64, Ordering},
Arc, Mutex, RwLock, RwLockReadGuard, RwLockWriteGuard,
@ -38,10 +39,12 @@ pub const FLUSH_THREADS_TESTING: usize = 1;
pub const ACCOUNTS_INDEX_CONFIG_FOR_TESTING: AccountsIndexConfig = AccountsIndexConfig {
bins: Some(BINS_FOR_TESTING),
flush_threads: Some(FLUSH_THREADS_TESTING),
drives: None,
};
pub const ACCOUNTS_INDEX_CONFIG_FOR_BENCHMARKS: AccountsIndexConfig = AccountsIndexConfig {
bins: Some(BINS_FOR_BENCHMARKS),
flush_threads: Some(FLUSH_THREADS_TESTING),
drives: None,
};
pub type ScanResult<T> = Result<T, ScanError>;
pub type SlotList<T> = Vec<(Slot, T)>;
@ -97,6 +100,7 @@ pub struct AccountSecondaryIndexesIncludeExclude {
pub struct AccountsIndexConfig {
pub bins: Option<usize>,
pub flush_threads: Option<usize>,
pub drives: Option<Vec<PathBuf>>,
}
#[derive(Debug, Default, Clone)]