Add incremental_snapshot_archive_interval_slots to SnapshotConfig (#19026)

This commit also renames `snapshot_interval_slots` to
`full_snapshot_archive_interval_slots`, updates the comments on the
fields, and make appropriate updates where SnapshotConfig is used.
This commit is contained in:
Brooks Prumo
2021-08-04 14:40:20 -05:00
committed by GitHub
parent cc27b8a5a7
commit ca14475085
11 changed files with 26 additions and 15 deletions

View File

@ -497,7 +497,8 @@ impl TestValidator {
account_paths: vec![ledger_path.join("accounts")],
poh_verify: false, // Skip PoH verification of ledger on startup for speed
snapshot_config: Some(SnapshotConfig {
snapshot_interval_slots: 100,
full_snapshot_archive_interval_slots: 100,
incremental_snapshot_archive_interval_slots: Slot::MAX,
snapshot_path: ledger_path.join("snapshot"),
snapshot_package_output_path: ledger_path.to_path_buf(),
archive_format: ArchiveFormat::Tar,

View File

@ -199,7 +199,7 @@ impl Tvu {
let snapshot_interval_slots = {
if let Some(config) = bank_forks.read().unwrap().snapshot_config() {
config.snapshot_interval_slots
config.full_snapshot_archive_interval_slots
} else {
std::u64::MAX
}

View File

@ -608,7 +608,7 @@ impl Validator {
let (snapshot_packager_service, snapshot_config_and_pending_package) =
if let Some(snapshot_config) = config.snapshot_config.clone() {
if is_snapshot_config_invalid(
snapshot_config.snapshot_interval_slots,
snapshot_config.full_snapshot_archive_interval_slots,
config.accounts_hash_interval_slots,
) {
error!("Snapshot config is invalid");