Skip to content
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

Improves error text when snapshot intervals are incompatible #33551

Merged
merged 1 commit into from
Oct 6, 2023

Conversation

brooksprumo
Copy link
Contributor

@brooksprumo brooksprumo commented Oct 5, 2023

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:

--full-snapshot-interval-slots <NUMBER>
            Number of slots between generating full snapshots. Must be a multiple of the incremental snapshot interval.
            [default: 25000]

new error text:

Invalid snapshot configuration provided: snapshot intervals are incompatible. 
	- full snapshot interval MUST be a multiple of incremental snapshot interval (if enabled) 
	- full snapshot interval MUST be larger than incremental snapshot interval (if enabled) 
Snapshot configuration values: 
	full snapshot interval: 25000 
	incremental snapshot interval: 420

Fixes: #33552

@brooksprumo brooksprumo added the v1.17 PRs that should be backported to v1.17 label Oct 5, 2023
@brooksprumo brooksprumo self-assigned this Oct 5, 2023
@brooksprumo brooksprumo marked this pull request as ready for review October 5, 2023 19:43
Copy link
Contributor

@steviez steviez left a 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.")
Copy link
Contributor

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

Copy link
Contributor Author

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.

Copy link
Contributor

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
Copy link

codecov bot commented Oct 5, 2023

Codecov Report

Merging #33551 (c90a4dc) into master (9c2663f) will increase coverage by 0.0%.
Report is 9 commits behind head on master.
The diff coverage is 98.1%.

@@           Coverage Diff           @@
##           master   #33551   +/-   ##
=======================================
  Coverage    81.7%    81.7%           
=======================================
  Files         805      805           
  Lines      218111   218159   +48     
=======================================
+ Hits       178379   178436   +57     
+ Misses      39732    39723    -9     

@brooksprumo brooksprumo merged commit 35a0295 into solana-labs:master Oct 6, 2023
31 checks passed
@brooksprumo brooksprumo deleted the snapshot-interval-help branch October 6, 2023 11:51
mergify bot pushed a commit that referenced this pull request Oct 6, 2023
brooksprumo added a commit that referenced this pull request Oct 6, 2023
…backport of #33551) (#33562)

(cherry picked from commit 35a0295)

Co-authored-by: Brooks <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v1.17 PRs that should be backported to v1.17
Projects
None yet
Development

Successfully merging this pull request may close these issues.

validator: wrong error message about accounts hash interval
2 participants