Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(meta): correctly update serving parallelism mapping #18439

Merged
merged 4 commits into from
Sep 6, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading