-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Validator CLI can specify accounts hash cache path #33117
Validator CLI can specify accounts hash cache path #33117
Conversation
9de5168
to
4d27c5a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
automerge label removed due to a CI failure |
(cherry picked from commit 88d3c8c) # Conflicts: # validator/src/main.rs
let accounts_hash_cache_path = matches | ||
.value_of("accounts_hash_cache_path") | ||
.map(Into::into) | ||
.unwrap_or_else(|| ledger_path.join(AccountsDb::DEFAULT_ACCOUNTS_HASH_CACHE_DIR)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the help makes no mention of a default
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What would be the preferred way to indicate the default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since we can't resolve the path at help generation time, something like...
format!("[default: LEDGER_DIR/{}]", AccountsDb::DEFAULT_ACCOUNTS_HASH_CACHE_DIR)
at the end of the help message
(cherry picked from commit 88d3c8c)
(cherry picked from commit 88d3c8c)
…#33117) (#33127) Validator CLI can specify accounts hash cache path (#33117) (cherry picked from commit 88d3c8c) Co-authored-by: Brooks <[email protected]>
Problem
The accounts hash cache is stored in the ledger directory, and does not have a way for a node operator to move it. Since the accounts hash cache has a decent amount of I/O, if a disk is overwhelmed, there's no way to move the accounts hash cache somewhere else.
Summary of Changes
Add a CLI arg,
--accounts-hash-cache-path
, tosolana-validator
to specify the accounts hash cache path.