Skip to content

Commit e8a22ab

Browse files
committed
diag: atomic stderr write
1 parent 7c91b3e commit e8a22ab

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/distributed_planner/distribute_plan.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,14 @@ fn _distribute_plan(
146146
// This is a CollectLeft HashJoinExec with the build side marked as being broadcast. we
147147
// need to insert a NetworkBroadcastExec and scale up the BroadcastExec consumer_tasks.
148148
PlanOrNetworkBoundary::Broadcast => {
149-
eprintln!(
150-
"DISTPLAN.Broadcast: task_count={task_count} max_child_task_count={max_child_task_count:?} task_count_annot={:?}",
149+
let line = format!(
150+
"DISTPLAN_BCAST pid={} task_count={task_count} max_child={max_child_task_count:?} annot={:?}\n",
151+
std::process::id(),
151152
annotated_plan.task_count
152153
);
154+
// Single write so output isn't interleaved.
155+
use std::io::Write;
156+
let _ = std::io::stderr().write_all(line.as_bytes());
153157
// It would need a network boundary, but on both sides of the boundary there is just 1 task,
154158
// so we are fine with not introducing any network boundary.
155159
if task_count == 1 && max_child_task_count == Some(1) {

0 commit comments

Comments
 (0)