disk bucket: init restart path (#33375)

This commit is contained in:
Jeff Washington (jwash) 2023-09-22 11:40:46 -07:00 committed by GitHub
parent d2464d9d7c
commit 7cf71011fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 1 deletions

View File

@ -204,7 +204,15 @@ impl<T: IndexValue, U: DiskIndexValue + From<T> + Into<T>> BucketMapHolder<T, U>
.unwrap_or(DEFAULT_AGE_TO_STAY_IN_CACHE);
let mut bucket_config = BucketMapConfig::new(bins);
bucket_config.drives = config.as_ref().and_then(|config| config.drives.clone());
bucket_config.drives = config.as_ref().and_then(|config| {
bucket_config.restart_config_file = config.drives.as_ref().and_then(|drives| {
drives
.first()
.map(|drive| drive.join("accounts_index_restart"))
});
config.drives.clone()
});
let mem_budget_mb = match config
.as_ref()
.map(|config| &config.index_limit_mb)