Skip to content

Commit

Permalink
Revert "fix: avoid removal of retention configuration while updating …
Browse files Browse the repository at this point in the history
…snapshot" (#666)

Reverts #661 because with this change we're backward incompatible with older 
versions where .stream.json doesn't contain retention field.

This reverts commit 121bf01.
  • Loading branch information
nitisht authored Feb 19, 2024
1 parent b9ac6cf commit 335f0a6
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
3 changes: 0 additions & 3 deletions server/src/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ 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.
Expand Down Expand Up @@ -77,7 +76,6 @@ pub struct ObjectStoreFormat {
pub snapshot: Snapshot,
#[serde(default)]
pub cache_enabled: bool,
pub retention: Retention,
}

#[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
Expand Down Expand Up @@ -120,7 +118,6 @@ impl Default for ObjectStoreFormat {
stats: Stats::default(),
snapshot: Snapshot::default(),
cache_enabled: false,
retention: Retention::new(),
}
}
}
Expand Down
6 changes: 0 additions & 6 deletions server/src/storage/retention.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,6 @@ struct TaskView {
duration: String,
}

impl Retention {
pub fn new() -> Self {
Self { tasks: Vec::new() }
}
}

impl TryFrom<Vec<TaskView>> for Retention {
type Error = String;

Expand Down

0 comments on commit 335f0a6

Please sign in to comment.