refactor: remove retention_duration field from namespace catalog table (#6124)
parent
1b322a6a6e
commit
a3f2fe489c
|
@ -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<String>,
|
||||
/// The retention period in ns. None represents infinite duration (i.e. never drop data).
|
||||
pub retention_period_ns: Option<i64>,
|
||||
/// The topic that writes to this namespace will land in
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
ALTER TABLE namespace DROP COLUMN IF EXISTS retention_duration;
|
|
@ -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,
|
||||
|
|
|
@ -30,7 +30,6 @@ pub struct NamespaceAutocreation<C, T> {
|
|||
|
||||
topic_id: TopicId,
|
||||
query_id: QueryPoolId,
|
||||
retention: String,
|
||||
_input: PhantomData<T>,
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue