From ec8a7507045f78b389154552fe23683e6f617931 Mon Sep 17 00:00:00 2001 From: Shanicky Chen Date: Wed, 7 Aug 2024 15:08:17 +0800 Subject: [PATCH] Remove `list_all_table_fragments` from `ScaleController`, prefix unused vars in `generate_table_resize_plan`. Signed-off-by: Shanicky Chen --- src/meta/src/stream/scale.rs | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/src/meta/src/stream/scale.rs b/src/meta/src/stream/scale.rs index c3f495c5f4db0..5a6154bf8ca24 100644 --- a/src/meta/src/stream/scale.rs +++ b/src/meta/src/stream/scale.rs @@ -1927,23 +1927,6 @@ impl ScaleController { Ok(()) } - // FIXME: should be removed - pub(crate) async fn list_all_table_fragments(&self) -> MetaResult> { - use crate::model::MetadataModel; - let all_table_fragments = match &self.metadata_manager { - MetadataManager::V1(mgr) => mgr.fragment_manager.list_table_fragments().await, - MetadataManager::V2(mgr) => mgr - .catalog_controller - .table_fragments() - .await? - .into_values() - .map(model::TableFragments::from_protobuf) - .collect(), - }; - - Ok(all_table_fragments) - } - pub async fn generate_table_resize_plan( &self, policy: TableResizePolicy, @@ -2097,10 +2080,10 @@ impl ScaleController { let RescheduleWorkingSet { fragments, actors, - actor_dispatchers: _, + actor_dispatchers: _actor_dispatchers, fragment_downstreams, - fragment_upstreams: _, - related_jobs, + fragment_upstreams: _fragment_upstreams, + related_jobs: _related_jobs, } = mgr .catalog_controller .resolve_working_set_for_reschedule_tables(table_ids)