Make solana-ledger-tool retain all snapshots by default (#27788)
This commit is contained in:
parent
1a4b8b5b79
commit
1d5314b5e6
|
@ -58,8 +58,7 @@ use {
|
||||||
snapshot_package::PendingAccountsPackage,
|
snapshot_package::PendingAccountsPackage,
|
||||||
snapshot_utils::{
|
snapshot_utils::{
|
||||||
self, ArchiveFormat, SnapshotVersion, DEFAULT_ARCHIVE_COMPRESSION,
|
self, ArchiveFormat, SnapshotVersion, DEFAULT_ARCHIVE_COMPRESSION,
|
||||||
DEFAULT_MAX_FULL_SNAPSHOT_ARCHIVES_TO_RETAIN,
|
SUPPORTED_ARCHIVE_COMPRESSION,
|
||||||
DEFAULT_MAX_INCREMENTAL_SNAPSHOT_ARCHIVES_TO_RETAIN, SUPPORTED_ARCHIVE_COMPRESSION,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
solana_sdk::{
|
solana_sdk::{
|
||||||
|
@ -1441,8 +1440,9 @@ fn main() {
|
||||||
.takes_value(true)
|
.takes_value(true)
|
||||||
.help("Log when transactions are processed that reference the given key(s).");
|
.help("Log when transactions are processed that reference the given key(s).");
|
||||||
|
|
||||||
let default_max_full_snapshot_archives_to_retain =
|
// Use std::usize::MAX for maximum_*_snapshots_to_retain such that
|
||||||
&DEFAULT_MAX_FULL_SNAPSHOT_ARCHIVES_TO_RETAIN.to_string();
|
// ledger-tool commands will not remove any snapshots by default
|
||||||
|
let default_max_full_snapshot_archives_to_retain = &std::usize::MAX.to_string();
|
||||||
let maximum_full_snapshot_archives_to_retain = Arg::with_name(
|
let maximum_full_snapshot_archives_to_retain = Arg::with_name(
|
||||||
"maximum_full_snapshots_to_retain",
|
"maximum_full_snapshots_to_retain",
|
||||||
)
|
)
|
||||||
|
@ -1455,8 +1455,7 @@ fn main() {
|
||||||
"The maximum number of full snapshot archives to hold on to when purging older snapshots.",
|
"The maximum number of full snapshot archives to hold on to when purging older snapshots.",
|
||||||
);
|
);
|
||||||
|
|
||||||
let default_max_incremental_snapshot_archives_to_retain =
|
let default_max_incremental_snapshot_archives_to_retain = &std::usize::MAX.to_string();
|
||||||
&DEFAULT_MAX_INCREMENTAL_SNAPSHOT_ARCHIVES_TO_RETAIN.to_string();
|
|
||||||
let maximum_incremental_snapshot_archives_to_retain = Arg::with_name(
|
let maximum_incremental_snapshot_archives_to_retain = Arg::with_name(
|
||||||
"maximum_incremental_snapshots_to_retain",
|
"maximum_incremental_snapshots_to_retain",
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue