diff --git a/src/common/meta/src/ddl/table_meta.rs b/src/common/meta/src/ddl/table_meta.rs index 892466b7a3b5..3d4e5113acbb 100644 --- a/src/common/meta/src/ddl/table_meta.rs +++ b/src/common/meta/src/ddl/table_meta.rs @@ -163,15 +163,6 @@ impl TableMetadataAllocator { region_wal_options, }) } - - /// Sets table ids with all tasks. - pub async fn set_table_ids_on_logic_create(&self, tasks: &mut [CreateTableTask]) -> Result<()> { - for task in tasks { - let table_id = self.allocate_table_id(task).await?; - task.table_info.ident.table_id = table_id; - } - Ok(()) - } } pub type PeerAllocatorRef = Arc; diff --git a/src/common/meta/src/ddl_manager.rs b/src/common/meta/src/ddl_manager.rs index 5c93f658951b..db435d930d30 100644 --- a/src/common/meta/src/ddl_manager.rs +++ b/src/common/meta/src/ddl_manager.rs @@ -541,7 +541,7 @@ async fn handle_create_table_task( async fn handle_create_logical_table_tasks( ddl_manager: &DdlManager, cluster_id: ClusterId, - mut create_table_tasks: Vec, + create_table_tasks: Vec, ) -> Result { ensure!( !create_table_tasks.is_empty(), @@ -554,11 +554,6 @@ async fn handle_create_logical_table_tasks( &create_table_tasks, ) .await?; - // Sets table_ids on create_table_tasks - ddl_manager - .table_metadata_allocator - .set_table_ids_on_logic_create(&mut create_table_tasks) - .await?; let num_logical_tables = create_table_tasks.len(); let (id, output) = ddl_manager