Add maximum_incremental_snapshot_archives_to_retain to SnapshotConfig (#19612)
This commit is contained in:
@@ -26,4 +26,8 @@ pub struct SnapshotConfig {
|
||||
|
||||
/// Maximum number of full snapshot archives to retain
|
||||
pub maximum_full_snapshot_archives_to_retain: usize,
|
||||
|
||||
/// Maximum number of incremental snapshot archives to retain
|
||||
/// NOTE: Incremental snapshots will only be kept for the latest full snapshot
|
||||
pub maximum_incremental_snapshot_archives_to_retain: usize,
|
||||
}
|
||||
|
@@ -52,6 +52,7 @@ const DEFAULT_SNAPSHOT_VERSION: SnapshotVersion = SnapshotVersion::V1_2_0;
|
||||
pub(crate) const TMP_BANK_SNAPSHOT_PREFIX: &str = "tmp-bank-snapshot-";
|
||||
pub const TMP_SNAPSHOT_ARCHIVE_PREFIX: &str = "tmp-snapshot-archive-";
|
||||
pub const DEFAULT_MAX_FULL_SNAPSHOT_ARCHIVES_TO_RETAIN: usize = 2;
|
||||
pub const DEFAULT_MAX_INCREMENTAL_SNAPSHOT_ARCHIVES_TO_RETAIN: usize = 100;
|
||||
pub const FULL_SNAPSHOT_ARCHIVE_FILENAME_REGEX: &str = r"^snapshot-(?P<slot>[[:digit:]]+)-(?P<hash>[[:alnum:]]+)\.(?P<ext>tar|tar\.bz2|tar\.zst|tar\.gz)$";
|
||||
pub const INCREMENTAL_SNAPSHOT_ARCHIVE_FILENAME_REGEX: &str = r"^incremental-snapshot-(?P<base>[[:digit:]]+)-(?P<slot>[[:digit:]]+)-(?P<hash>[[:alnum:]]+)\.(?P<ext>tar|tar\.bz2|tar\.zst|tar\.gz)$";
|
||||
|
||||
|
Reference in New Issue
Block a user