From c8af7d0b0500872d717231cc7fb7352a6f12d107 Mon Sep 17 00:00:00 2001 From: gurjotkaur20 Date: Mon, 26 Feb 2024 10:57:35 +0530 Subject: [PATCH] fix: avoid removal of retention configuration while updating snapshot --- server/src/storage.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/src/storage.rs b/server/src/storage.rs index 975fcf445..790846790 100644 --- a/server/src/storage.rs +++ b/server/src/storage.rs @@ -37,6 +37,7 @@ pub use store_metadata::{ put_remote_metadata, put_staging_metadata, resolve_parseable_metadata, StorageMetadata, }; +use self::retention::Retention; pub use self::staging::StorageDir; /// local sync interval to move data.records to /tmp dir of that stream. @@ -76,6 +77,8 @@ pub struct ObjectStoreFormat { pub snapshot: Snapshot, #[serde(default)] pub cache_enabled: bool, + #[serde(skip_serializing_if = "Option::is_none")] + pub retention: Option, } #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)] @@ -118,6 +121,7 @@ impl Default for ObjectStoreFormat { stats: Stats::default(), snapshot: Snapshot::default(), cache_enabled: false, + retention: None, } } }