add arg --disable_accounts_disk_index (#23308)

This commit is contained in:
Jeff Washington (jwash)
2022-02-23 18:07:24 -06:00
committed by GitHub
parent c0d0724be0
commit 4bc440666a
2 changed files with 15 additions and 0 deletions

View File

@ -1479,6 +1479,12 @@ pub fn main() {
.takes_value(true)
.help("How much memory the accounts index can consume. If this is exceeded, some account index entries will be stored on disk. If missing, the entire index is stored in memory."),
)
.arg(
Arg::with_name("disable_accounts_disk_index")
.long("disable-accounts-disk-index")
.help("Disable the disk-based accounts index if it is enabled by default.")
.conflicts_with("accounts_index_memory_limit_mb")
)
.arg(
Arg::with_name("accounts_index_bins")
.long("accounts-index-bins")
@ -2126,6 +2132,8 @@ pub fn main() {
if let Some(limit) = value_t!(matches, "accounts_index_memory_limit_mb", usize).ok() {
accounts_index_config.index_limit_mb = Some(limit);
} else if matches.is_present("disable_accounts_disk_index") {
accounts_index_config.index_limit_mb = None;
}
{