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

chore: more logs for offline scaling (#19407) #19541

Merged
merged 1 commit into from
Nov 22, 2024
Merged
Changes from all commits
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
24 changes: 22 additions & 2 deletions src/meta/src/barrier/recovery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,13 +192,20 @@ impl GlobalBarrierManager {
.list_background_creating_jobs()
.await?;

info!(
"background streaming jobs: {:?} total {}",
background_streaming_jobs,
background_streaming_jobs.len()
);

// Resolve actor info for recovery. If there's no actor to recover, most of the
// following steps will be no-op, while the compute nodes will still be reset.
// FIXME: Transactions should be used.
// TODO(error-handling): attach context to the errors and log them together, instead of inspecting everywhere.
let mut info = if !self.env.opts.disable_automatic_parallelism_control
&& background_streaming_jobs.is_empty()
{
info!("trigger offline scaling");
self.context
.scale_actors(&active_streaming_nodes)
.await
Expand All @@ -210,6 +217,7 @@ impl GlobalBarrierManager {
warn!(error = %err.as_report(), "resolve actor info failed");
})?
} else {
info!("trigger actor migration");
// Migrate actors in expired CN to newly joined one.
self.context
.migrate_actors(&mut active_streaming_nodes)
Expand Down Expand Up @@ -532,7 +540,7 @@ impl GlobalBarrierManagerContext {

mgr.catalog_controller.migrate_actors(plan).await?;

debug!("migrate actors succeed.");
info!("migrate actors succeed.");

self.resolve_graph_info().await
}
Expand Down Expand Up @@ -603,6 +611,11 @@ impl GlobalBarrierManagerContext {
result
};

info!(
"target table parallelisms for offline scaling: {:?}",
table_parallelisms
);

let schedulable_worker_ids = active_nodes
.current()
.values()
Expand All @@ -616,6 +629,11 @@ impl GlobalBarrierManagerContext {
.map(|worker| worker.id as WorkerId)
.collect();

info!(
"target worker ids for offline scaling: {:?}",
schedulable_worker_ids
);

let plan = self
.scale_controller
.generate_table_resize_plan(TableResizePolicy {
Expand Down Expand Up @@ -653,6 +671,8 @@ impl GlobalBarrierManagerContext {
// Because custom parallelism doesn't exist, this function won't result in a no-shuffle rewrite for table parallelisms.
debug_assert_eq!(compared_table_parallelisms, table_parallelisms);

info!("post applying reschedule for offline scaling");

if let Err(e) = self
.scale_controller
.post_apply_reschedule(&reschedule_fragment, &table_parallelisms)
Expand All @@ -666,7 +686,7 @@ impl GlobalBarrierManagerContext {
return Err(e);
}

debug!("scaling actors succeed.");
info!("scaling actors succeed.");
Ok(())
}

Expand Down
Loading