Skip to content

Commit

Permalink
validators always skip clean/shrink on startup (#30710)
Browse files Browse the repository at this point in the history
* validators always skip clean/shrink on startup

* move arg to get_deprecated_arguments
  • Loading branch information
jeffwashington authored Mar 14, 2023
1 parent f528335 commit 62fe6ea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 4 additions & 6 deletions validator/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1185,12 +1185,6 @@ pub fn app<'a>(version: &'a str, default_args: &'a DefaultArgs) -> App<'a, 'a> {
.help("Debug option to scan all append vecs and verify account index refcounts prior to clean")
.hidden(true)
)
.arg(
Arg::with_name("accounts_db_skip_shrink")
.long("accounts-db-skip-shrink")
.help("Enables faster starting of validators by skipping shrink. \
This option is for use during testing."),
)
.arg(
Arg::with_name("accounts_db_create_ancient_storage_packed")
.long("accounts-db-create-ancient-storage-packed")
Expand Down Expand Up @@ -1560,6 +1554,10 @@ pub fn app<'a>(version: &'a str, default_args: &'a DefaultArgs) -> App<'a, 'a> {
// avoid breaking validator startup commands
fn get_deprecated_arguments() -> Vec<Arg<'static, 'static>> {
vec![
Arg::with_name("accounts_db_skip_shrink")
.long("accounts-db-skip-shrink")
.help("This is obsolete since it is now enabled by default. Enables faster starting of validators by skipping startup clean and shrink.")
.hidden(true),
Arg::with_name("accounts_db_caching_enabled")
.long("accounts-db-caching-enabled")
.hidden(true),
Expand Down
2 changes: 1 addition & 1 deletion validator/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1234,7 +1234,7 @@ pub fn main() {
account_indexes,
accounts_db_test_hash_calculation: matches.is_present("accounts_db_test_hash_calculation"),
accounts_db_config,
accounts_db_skip_shrink: matches.is_present("accounts_db_skip_shrink"),
accounts_db_skip_shrink: true,
tpu_coalesce_ms,
no_wait_for_vote_to_start_leader: matches.is_present("no_wait_for_vote_to_start_leader"),
accounts_shrink_ratio,
Expand Down

0 comments on commit 62fe6ea

Please sign in to comment.