Add option to disable rocks compaction (#9011)

This commit is contained in:
sakridge
2020-03-23 08:42:32 -07:00
committed by GitHub
parent 87096f13d2
commit 4d2b83d01f
5 changed files with 32 additions and 7 deletions

View File

@ -641,6 +641,12 @@ pub fn main() {
.takes_value(false)
.help("Use the RPC service of trusted validators only")
)
.arg(
Arg::with_name("no_rocksdb_compaction")
.long("no-rocksdb-compaction")
.takes_value(false)
.help("Disable manual compaction of the ledger database. May increase storage requirements.")
)
.arg(
clap::Arg::with_name("bind_address")
.long("bind-address")
@ -698,6 +704,7 @@ pub fn main() {
let no_snapshot_fetch = matches.is_present("no_snapshot_fetch");
let no_check_vote_account = matches.is_present("no_check_vote_account");
let private_rpc = matches.is_present("private_rpc");
let no_rocksdb_compaction = matches.is_present("no_rocksdb_compaction");
// Canonicalize ledger path to avoid issues with symlink creation
let _ = fs::create_dir_all(&ledger_path);
@ -748,6 +755,7 @@ pub fn main() {
wait_for_supermajority: value_t!(matches, "wait_for_supermajority", Slot).ok(),
trusted_validators,
frozen_accounts: values_t!(matches, "frozen_accounts", Pubkey).unwrap_or_default(),
no_rocksdb_compaction,
..ValidatorConfig::default()
};