Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

add validator option --accounts-db-skip-shrink #19028

Merged
merged 2 commits into from
Aug 4, 2021

Conversation

jeffwashington
Copy link
Contributor

@jeffwashington jeffwashington commented Aug 3, 2021

Problem

When restarting validators with large snapshots, shrink can take hours. This option is useful to more quickly get to other troublesome parts of validator startup while debugging the system.

Summary of Changes

Fixes #

@jeffwashington jeffwashington force-pushed the skip_shrink branch 4 times, most recently from e70a5bf to d068b38 Compare August 3, 2021 22:06
@jeffwashington
Copy link
Contributor Author

verified this disables shrink on a validator

@jeffwashington jeffwashington marked this pull request as ready for review August 4, 2021 16:12
CriesofCarrots
CriesofCarrots previously approved these changes Aug 4, 2021
Copy link
Contributor

@CriesofCarrots CriesofCarrots left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm! one typo nit
I'm thinking of plumbing this into the multinode/net scripts. Are there any other accounts db or index validator parameters that you think would be useful to be able to toggle from the testnet run commands?

Arg::with_name("accounts_db_skip_shrink")
.long("accounts-db-skip-shrink")
.help("Enables faster starting of validators by skipping shrink. \
This option if for use during testing."),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This option if for use during testing."),
This option is for use during testing."),

@mergify mergify bot dismissed CriesofCarrots’s stale review August 4, 2021 18:23

Pull request has been modified.

@t-nelson
Copy link
Contributor

t-nelson commented Aug 4, 2021

Any plans to backport this one? If not, can we add a hidden stub flag on v1.7 for compatibility

@jeffwashington
Copy link
Contributor Author

Any plans to backport this one? If not, can we add a hidden stub flag on v1.7 for compatibility

I have no objections to back porting it. It should not add risk if I did it right ;-)

@codecov
Copy link

codecov bot commented Aug 4, 2021

Codecov Report

Merging #19028 (4d3c19f) into master (cde1461) will decrease coverage by 0.0%.
The diff coverage is 81.8%.

@@            Coverage Diff            @@
##           master   #19028     +/-   ##
=========================================
- Coverage    82.8%    82.8%   -0.1%     
=========================================
  Files         449      449             
  Lines      127997   128002      +5     
=========================================
+ Hits       105993   105994      +1     
- Misses      22004    22008      +4     

@jeffwashington jeffwashington merged commit 3280ae3 into solana-labs:master Aug 4, 2021
mergify bot pushed a commit that referenced this pull request Aug 9, 2021
* add validator option --accounts-db-skip-shrink

* typo

(cherry picked from commit 3280ae3)

# Conflicts:
#	core/tests/snapshots.rs
#	ledger/src/bank_forks_utils.rs
#	ledger/src/blockstore_processor.rs
#	replica-node/src/replica_node.rs
#	runtime/src/snapshot_utils.rs
CriesofCarrots pushed a commit that referenced this pull request Aug 10, 2021
* add validator option --accounts-db-skip-shrink

* typo

(cherry picked from commit 3280ae3)

# Conflicts:
#	core/tests/snapshots.rs
#	ledger/src/bank_forks_utils.rs
#	ledger/src/blockstore_processor.rs
#	replica-node/src/replica_node.rs
#	runtime/src/snapshot_utils.rs
CriesofCarrots pushed a commit that referenced this pull request Aug 10, 2021
)

* add validator option --accounts-db-skip-shrink (#19028)

* add validator option --accounts-db-skip-shrink

* typo

(cherry picked from commit 3280ae3)

# Conflicts:
#	core/tests/snapshots.rs
#	ledger/src/bank_forks_utils.rs
#	ledger/src/blockstore_processor.rs
#	replica-node/src/replica_node.rs
#	runtime/src/snapshot_utils.rs

* Fix conflicts

Co-authored-by: Jeff Washington (jwash) <[email protected]>
Co-authored-by: Tyera Eulberg <[email protected]>
@brooksprumo brooksprumo mentioned this pull request Aug 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants