Skip to content

Commit 45cdc04

Browse files
committed
agave, snapshot: add download-abort param, delay download speed check
1 parent 57f873f commit 45cdc04

File tree

6 files changed

+13
-1
lines changed

6 files changed

+13
-1
lines changed

agave

src/app/fdctl/commands/run_agave.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ agave_boot( config_t const * config ) {
167167
if( strcmp( "", config->frankendancer.snapshots.incremental_path ) ) ADD( "--incremental-snapshot-archive-path", config->frankendancer.snapshots.incremental_path );
168168
ADDU( "--maximum-snapshots-to-retain", config->frankendancer.snapshots.maximum_full_snapshots_to_retain );
169169
ADDU( "--maximum-incremental-snapshots-to-retain", config->frankendancer.snapshots.maximum_incremental_snapshots_to_retain );
170+
ADDU( "--maximum-snapshot-download-abort", config->frankendancer.snapshots.maximum_snapshot_download_abort );
170171
ADDU( "--minimal-snapshot-download-speed", config->frankendancer.snapshots.minimum_snapshot_download_speed );
171172

172173
if( config->frankendancer.layout.agave_unified_scheduler_handler_threads ) {

src/app/fdctl/config/default.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,14 @@ dynamic_port_range = "8900-9000"
398398
# client with the `--minimum-snapshot-download-speed` argument.
399399
minimum_snapshot_download_speed = 10485760
400400

401+
# The maximum number of times to abort and retry when encountering a
402+
# slow snapshot download.
403+
#
404+
# The default value is 5 retries. This option is passed to the
405+
# Agave client with the `--maximum-snapshot-download-abort`
406+
# argument.
407+
maximum_snapshot_download_abort = 5
408+
401409
# Absolute directory path for storing snapshots. If no path is
402410
# provided, it defaults to the [ledger.path] option from above.
403411
#

src/app/shared/fd_config.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,7 @@ fd_config_validateh( fd_configh_t const * config ) {
445445
CFG_HAS_NON_ZERO( snapshots.full_snapshot_interval_slots );
446446
CFG_HAS_NON_ZERO( snapshots.incremental_snapshot_interval_slots );
447447
CFG_HAS_NON_ZERO( snapshots.minimum_snapshot_download_speed );
448+
CFG_HAS_NON_ZERO( snapshots.maximum_snapshot_download_abort );
448449

449450
CFG_HAS_NON_EMPTY( layout.agave_affinity );
450451
}

src/app/shared/fd_config.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ struct fd_configh {
7676
uint full_snapshot_interval_slots;
7777
uint incremental_snapshot_interval_slots;
7878
uint minimum_snapshot_download_speed;
79+
uint maximum_snapshot_download_abort;
7980
uint maximum_full_snapshots_to_retain;
8081
uint maximum_incremental_snapshots_to_retain;
8182
char path[ PATH_MAX ];

src/app/shared/fd_config_parse.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,7 @@ fd_config_extract_podh( uchar * pod,
298298
CFG_POP ( uint, snapshots.full_snapshot_interval_slots );
299299
CFG_POP ( uint, snapshots.incremental_snapshot_interval_slots );
300300
CFG_POP ( uint, snapshots.minimum_snapshot_download_speed );
301+
CFG_POP ( uint, snapshots.maximum_snapshot_download_abort );
301302
CFG_POP ( uint, snapshots.maximum_full_snapshots_to_retain );
302303
CFG_POP ( uint, snapshots.maximum_incremental_snapshots_to_retain);
303304
CFG_POP ( cstr, snapshots.path );

0 commit comments

Comments
 (0)