Skip to content

Commit

Permalink
fix(meta): correctly update serving parallelism mapping (#18439)
Browse files Browse the repository at this point in the history
(cherry picked from commit 71753f1)
  • Loading branch information
zwang28 authored and stdrc committed Nov 22, 2024
1 parent d691872 commit 376ac10
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/meta/src/serving/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,16 @@ pub async fn start_serving_vnode_mapping_worker(
continue;
}
let (workers, streaming_parallelisms) = fetch_serving_infos(&metadata_manager).await;
let (upserted, failed) = serving_vnode_mapping.upsert(streaming_parallelisms, &workers);
let filtered_streaming_parallelisms = fragment_ids.iter().filter_map(|frag_id|{
match streaming_parallelisms.get(frag_id) {
Some(parallelism) => Some((*frag_id, *parallelism)),
None => {
tracing::warn!(fragment_id = *frag_id, "streaming parallelism not found");
None
}
}
}).collect();
let (upserted, failed) = serving_vnode_mapping.upsert(filtered_streaming_parallelisms, &workers);
if !upserted.is_empty() {
tracing::debug!("Update serving vnode mapping for fragments {:?}.", upserted.keys());
notification_manager.notify_frontend_without_version(Operation::Update, Info::ServingWorkerSlotMappings(FragmentWorkerSlotMappings{ mappings: to_fragment_worker_slot_mapping(&upserted) }));
Expand Down

0 comments on commit 376ac10

Please sign in to comment.