Rename maximum_full_snapshot_archives_to_retain (#19610)
To prepare for adding maximum_incremental_snapshot_archives_to_retain, rename the current field in SnapshotConfig.
This commit is contained in:
@ -342,7 +342,7 @@ mod tests {
|
||||
bank_snapshots_dir: PathBuf::default(),
|
||||
archive_format: ArchiveFormat::Tar,
|
||||
snapshot_version: SnapshotVersion::default(),
|
||||
maximum_snapshots_to_retain: usize::MAX,
|
||||
maximum_full_snapshot_archives_to_retain: usize::MAX,
|
||||
};
|
||||
for i in 0..MAX_SNAPSHOT_HASHES + 1 {
|
||||
let accounts_package = AccountsPackage {
|
||||
|
@ -527,7 +527,8 @@ impl TestValidator {
|
||||
snapshot_archives_dir: ledger_path.to_path_buf(),
|
||||
archive_format: ArchiveFormat::Tar,
|
||||
snapshot_version: SnapshotVersion::default(),
|
||||
maximum_snapshots_to_retain: DEFAULT_MAX_FULL_SNAPSHOT_ARCHIVES_TO_RETAIN,
|
||||
maximum_full_snapshot_archives_to_retain:
|
||||
DEFAULT_MAX_FULL_SNAPSHOT_ARCHIVES_TO_RETAIN,
|
||||
}),
|
||||
enforce_ulimit_nofile: false,
|
||||
warp_slot: config.warp_slot,
|
||||
|
@ -651,7 +651,7 @@ impl Validator {
|
||||
snapshot_hash,
|
||||
&exit,
|
||||
&cluster_info,
|
||||
snapshot_config.maximum_snapshots_to_retain,
|
||||
snapshot_config.maximum_full_snapshot_archives_to_retain,
|
||||
);
|
||||
(
|
||||
Some(snapshot_packager_service),
|
||||
@ -1237,7 +1237,7 @@ fn new_banks_from_ledger(
|
||||
None,
|
||||
&snapshot_config.snapshot_archives_dir,
|
||||
snapshot_config.archive_format,
|
||||
snapshot_config.maximum_snapshots_to_retain,
|
||||
snapshot_config.maximum_full_snapshot_archives_to_retain,
|
||||
)
|
||||
.unwrap_or_else(|err| {
|
||||
error!("Unable to create snapshot: {}", err);
|
||||
|
@ -147,7 +147,8 @@ mod tests {
|
||||
bank_snapshots_dir: bank_snapshots_dir.path().to_path_buf(),
|
||||
archive_format: ArchiveFormat::TarBzip2,
|
||||
snapshot_version,
|
||||
maximum_snapshots_to_retain: DEFAULT_MAX_FULL_SNAPSHOT_ARCHIVES_TO_RETAIN,
|
||||
maximum_full_snapshot_archives_to_retain:
|
||||
DEFAULT_MAX_FULL_SNAPSHOT_ARCHIVES_TO_RETAIN,
|
||||
};
|
||||
bank_forks.set_snapshot_config(Some(snapshot_config.clone()));
|
||||
SnapshotTestConfig {
|
||||
@ -771,7 +772,7 @@ mod tests {
|
||||
bank.get_snapshot_storages(None),
|
||||
snapshot_config.archive_format,
|
||||
snapshot_config.snapshot_version,
|
||||
snapshot_config.maximum_snapshots_to_retain,
|
||||
snapshot_config.maximum_full_snapshot_archives_to_retain,
|
||||
)?;
|
||||
|
||||
Ok(())
|
||||
@ -807,7 +808,7 @@ mod tests {
|
||||
storages,
|
||||
snapshot_config.archive_format,
|
||||
snapshot_config.snapshot_version,
|
||||
snapshot_config.maximum_snapshots_to_retain,
|
||||
snapshot_config.maximum_full_snapshot_archives_to_retain,
|
||||
)?;
|
||||
|
||||
Ok(())
|
||||
@ -924,7 +925,7 @@ mod tests {
|
||||
&cluster_info,
|
||||
snapshot_test_config
|
||||
.snapshot_config
|
||||
.maximum_snapshots_to_retain,
|
||||
.maximum_full_snapshot_archives_to_retain,
|
||||
);
|
||||
|
||||
let accounts_hash_verifier = AccountsHashVerifier::new(
|
||||
|
Reference in New Issue
Block a user