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
…) (#18353)

Co-authored-by: zwang28 <[email protected]>
  • Loading branch information
github-actions[bot] and zwang28 authored Sep 2, 2024
1 parent 3ea992d commit dc8faba
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 @@ -1896,7 +1896,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 dc8faba

Please sign in to comment.