diff --git a/data_types/src/lib.rs b/data_types/src/lib.rs index c4d92c92be..8ffb8859ab 100644 --- a/data_types/src/lib.rs +++ b/data_types/src/lib.rs @@ -438,10 +438,7 @@ pub struct Namespace { pub id: NamespaceId, /// The unique name of the namespace pub name: String, - /// The retention duration as a string. 'inf' or not present represents infinite duration (i.e. - /// never drop data). #[sqlx(default)] - pub retention_duration: Option, /// The retention period in ns. None represents infinite duration (i.e. never drop data). pub retention_period_ns: Option, /// The topic that writes to this namespace will land in diff --git a/iox_catalog/migrations/20221111133939_drop_retention_duration.sql b/iox_catalog/migrations/20221111133939_drop_retention_duration.sql new file mode 100644 index 0000000000..ece48e7177 --- /dev/null +++ b/iox_catalog/migrations/20221111133939_drop_retention_duration.sql @@ -0,0 +1 @@ +ALTER TABLE namespace DROP COLUMN IF EXISTS retention_duration; \ No newline at end of file diff --git a/iox_catalog/src/mem.rs b/iox_catalog/src/mem.rs index 390c9293a1..e7c97d0b40 100644 --- a/iox_catalog/src/mem.rs +++ b/iox_catalog/src/mem.rs @@ -301,7 +301,6 @@ impl NamespaceRepo for MemTxn { name: name.to_string(), topic_id, query_pool_id, - retention_duration: Some("inf".to_string()), // temporary until the field retention_durantion is removed in the catalgo table in next PR max_tables: DEFAULT_MAX_TABLES, max_columns_per_table: DEFAULT_MAX_COLUMNS_PER_TABLE, retention_period_ns: DEFAULT_RETENTION_PERIOD, diff --git a/router/src/dml_handlers/ns_autocreation.rs b/router/src/dml_handlers/ns_autocreation.rs index 186baf0f3b..eea205001a 100644 --- a/router/src/dml_handlers/ns_autocreation.rs +++ b/router/src/dml_handlers/ns_autocreation.rs @@ -30,7 +30,6 @@ pub struct NamespaceAutocreation { topic_id: TopicId, query_id: QueryPoolId, - retention: String, _input: PhantomData, } @@ -165,7 +164,6 @@ mod tests { cache, TopicId::new(42), QueryPoolId::new(42), - "inf".to_owned(), ); // Drive the code under test @@ -201,7 +199,6 @@ mod tests { cache, TopicId::new(42), QueryPoolId::new(42), - "inf".to_owned(), ); creator diff --git a/router/src/namespace_resolver/ns_autocreation.rs b/router/src/namespace_resolver/ns_autocreation.rs index eaa67442d5..f1e2e33f8e 100644 --- a/router/src/namespace_resolver/ns_autocreation.rs +++ b/router/src/namespace_resolver/ns_autocreation.rs @@ -200,7 +200,6 @@ mod tests { Namespace { id: NamespaceId::new(1), name: ns.to_string(), - retention_duration: Some("inf".to_owned()), topic_id: TopicId::new(42), query_pool_id: QueryPoolId::new(42), max_tables: iox_catalog::DEFAULT_MAX_TABLES,