From 6738a246e3697031cb6bc46a72de036bf0efd433 Mon Sep 17 00:00:00 2001 From: August Date: Mon, 4 Dec 2023 15:38:36 +0800 Subject: [PATCH 1/2] fix: don't clean in-memory tracker when clean persist table catalog --- src/meta/src/manager/catalog/database.rs | 3 +-- src/meta/src/manager/catalog/mod.rs | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/meta/src/manager/catalog/database.rs b/src/meta/src/manager/catalog/database.rs index 735ef4c338e6a..d630f08626c9f 100644 --- a/src/meta/src/manager/catalog/database.rs +++ b/src/meta/src/manager/catalog/database.rs @@ -417,8 +417,7 @@ impl DatabaseManager { } pub fn has_in_progress_creation(&self, relation: &RelationKey) -> bool { - self.in_progress_creation_tracker - .contains(&relation.clone()) + self.in_progress_creation_tracker.contains(relation) } /// For all types of DDL diff --git a/src/meta/src/manager/catalog/mod.rs b/src/meta/src/manager/catalog/mod.rs index 5557cb109e97d..a20f0a1041a20 100644 --- a/src/meta/src/manager/catalog/mod.rs +++ b/src/meta/src/manager/catalog/mod.rs @@ -885,7 +885,6 @@ impl CatalogManager { self.env.event_log_manager_ref().add_event_logs(event_logs); } - database_core.clear_creating_stream_jobs(); let user_core = &mut core.user; for table in &tables_to_clean { // If table type is internal, no need to update the ref count OR From 6db78ff5d78df485e86e7d707b4aa6d2954427b2 Mon Sep 17 00:00:00 2001 From: August Date: Mon, 4 Dec 2023 15:48:51 +0800 Subject: [PATCH 2/2] fix --- src/meta/src/manager/catalog/database.rs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/meta/src/manager/catalog/database.rs b/src/meta/src/manager/catalog/database.rs index d630f08626c9f..56e14486adedc 100644 --- a/src/meta/src/manager/catalog/database.rs +++ b/src/meta/src/manager/catalog/database.rs @@ -462,11 +462,6 @@ impl DatabaseManager { self.in_progress_creation_streaming_job.keys().cloned() } - pub fn clear_creating_stream_jobs(&mut self) { - self.in_progress_creation_tracker.clear(); - self.in_progress_creation_streaming_job.clear(); - } - pub fn mark_creating_tables(&mut self, tables: &[Table]) { self.in_progress_creating_tables .extend(tables.iter().map(|t| (t.id, t.clone())));