Skip to content

Commit b5acf0b

Browse files
authored
fix: avoid removal of retention configuration while updating snapshot (#673)
current: when server restarts, the retention config gets deleted from stream.json change: retention config does not get deleted on server restart Fixes: #654
1 parent e7cd586 commit b5acf0b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

server/src/storage.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ pub use store_metadata::{
3737
put_remote_metadata, put_staging_metadata, resolve_parseable_metadata, StorageMetadata,
3838
};
3939

40+
use self::retention::Retention;
4041
pub use self::staging::StorageDir;
4142

4243
/// local sync interval to move data.records to /tmp dir of that stream.
@@ -78,6 +79,8 @@ pub struct ObjectStoreFormat {
7879
pub snapshot: Snapshot,
7980
#[serde(default)]
8081
pub cache_enabled: bool,
82+
#[serde(skip_serializing_if = "Option::is_none")]
83+
pub retention: Option<Retention>,
8184
}
8285

8386
#[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
@@ -121,6 +124,7 @@ impl Default for ObjectStoreFormat {
121124
stats: Stats::default(),
122125
snapshot: Snapshot::default(),
123126
cache_enabled: false,
127+
retention: None,
124128
}
125129
}
126130
}

0 commit comments

Comments
 (0)