-
Notifications
You must be signed in to change notification settings - Fork 317
snapshots: add initial peer selection #5982
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
base: main
Are you sure you want to change the base?
Conversation
int incremental_snapshot_fetch; | ||
int do_download; | ||
uint maximum_local_snapshot_age; | ||
uint minimum_download_speed_mib; | ||
uint maximum_download_retry_abort; | ||
ulong initial_peers_cnt; | ||
fd_ip4_port_t initial_peers[ 16 ]; |
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.
nit: alignment, also 16UL
@@ -282,7 +282,8 @@ user = "" | |||
# present. | |||
# | |||
# TODO: implement the "at most one downloaded " logic. " | |||
download = true | |||
# TODO: default to true once integrated with gossip | |||
download = false |
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.
we should keep this as true because the snapshot loader has no way of knowing whether the snapshots on disk are recent right now.
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.
Having download as true involves setting an initial peer in the default config, which assumes a cluster. This needs to be a trusted peer too. This is partly the reason we removed hardcoded entrypoints in the first place. The user knows the target cluster and should set this field.
Second, I believe the download option isn't actually used anywhere in snapshot code apart from the config check I added.
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.
oh you are right, but we should check the download config option in the snapshot tiles.
No description provided.