Skip to content

Commit

Permalink
Remove list_all_table_fragments from ScaleController, prefix unus…
Browse files Browse the repository at this point in the history
…ed vars in `generate_table_resize_plan`.

Signed-off-by: Shanicky Chen <[email protected]>
  • Loading branch information
shanicky committed Aug 8, 2024
1 parent 0c9a9a6 commit ec8a750
Showing 1 changed file with 3 additions and 20 deletions.
23 changes: 3 additions & 20 deletions src/meta/src/stream/scale.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1927,23 +1927,6 @@ impl ScaleController {
Ok(())
}

// FIXME: should be removed
pub(crate) async fn list_all_table_fragments(&self) -> MetaResult<Vec<model::TableFragments>> {
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,
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit ec8a750

Please sign in to comment.