Skip to content

Commit

Permalink
fix(meta): correctly update serving vnode mapping after scaling (#18349)
Browse files Browse the repository at this point in the history
  • Loading branch information
zwang28 authored Sep 2, 2024
1 parent 602c6ad commit f60be13
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions src/meta/src/manager/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,16 @@ impl MetadataManager {
}
}

pub async fn list_active_serving_compute_nodes(&self) -> MetaResult<Vec<PbWorkerNode>> {
match self {
MetadataManager::V1(mgr) => Ok(mgr
.cluster_manager
.list_active_serving_compute_nodes()
.await),
MetadataManager::V2(mgr) => mgr.cluster_controller.list_active_serving_workers().await,
}
}

pub async fn list_background_creating_jobs(&self) -> MetaResult<Vec<TableId>> {
match self {
MetadataManager::V1(mgr) => {
Expand Down
2 changes: 1 addition & 1 deletion src/meta/src/stream/scale.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1745,7 +1745,7 @@ impl ScaleController {
if !reschedules.is_empty() {
let workers = self
.metadata_manager
.list_active_streaming_compute_nodes()
.list_active_serving_compute_nodes()
.await?;
let streaming_parallelisms = self
.metadata_manager
Expand Down

0 comments on commit f60be13

Please sign in to comment.