-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Improves error text when snapshot intervals are incompatible #33551
Improves error text when snapshot intervals are incompatible #33551
Conversation
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 - I'm happy pushing as-is, but curious about your thoughts on one item I called out too
@@ -468,7 +468,8 @@ pub fn app<'a>(version: &'a str, default_args: &'a DefaultArgs) -> App<'a, 'a> { | |||
.value_name("NUMBER") | |||
.takes_value(true) | |||
.default_value(&default_args.full_snapshot_archive_interval_slots) | |||
.help("Number of slots between generating full snapshots") | |||
.help("Number of slots between generating full snapshots. \ | |||
Must be a multiple of the incremental snapshot interval.") |
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 do you think of:
Must be a multiple of --incremental-snapshot-interval-slots value
I mention this as I see --no-incremental-snapshots
specifically mention args like this, but I'm fine with what you have as well. I don't think we have a hard rule on this
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 tricky thing is that we alias --snapshot-interval
and --incremental-snapshot-interval
. I didn't want to put 'em both here in the text for fear of being too long.
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.
Yeah true, I used the more explicit value but I see your point.
Codecov Report
@@ Coverage Diff @@
## master #33551 +/- ##
=======================================
Coverage 81.7% 81.7%
=======================================
Files 805 805
Lines 218111 218159 +48
=======================================
+ Hits 178379 178436 +57
+ Misses 39732 39723 -9 |
(cherry picked from commit 35a0295)
…backport of #33551) (#33562) (cherry picked from commit 35a0295) Co-authored-by: Brooks <[email protected]>
Problem
Starting in v1.17.0, we changed how the snapshot intervals were set. Specifically, the accounts hash interval is no longer manually set, and instead is coerced to the snapshot interval (see #31987). This effectively means that the full snapshot interval must be a multiple of the incremental snapshot interval.
That wasn't strictly required before, and a testnet validator ran into it here: https://discord.com/channels/428295358100013066/670512312339398668/1159565622074679407
The error text could be more clear about what is happening.
Summary of Changes
Remove mentions of the accounts hash interval, and use incremental snapshot interval instead.
new help text:
new error text:
Fixes: #33552