Skip to content

Commit f7afb98

Browse files
authored
Fix missing condition for scaling warning (#5803)
1 parent 42f0c58 commit f7afb98

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

quickwit/quickwit-control-plane/src/indexing_scheduler/scheduling/scheduling_logic.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -305,10 +305,12 @@ fn place_unassigned_shards_ignoring_affinity(
305305
match attempt_place_unassigned_shards(&unassigned_shards[..], &problem, partial_solution) {
306306
Ok(mut solution) => {
307307
// the higher the attempt number, the more unbalanced the solution
308-
tracing::warn!(
309-
attempt_number = attempt_number,
310-
"capacity re-scaled, scheduling solution likely unbalanced"
311-
);
308+
if attempt_number > 0 {
309+
tracing::warn!(
310+
attempt_number = attempt_number,
311+
"capacity re-scaled, scheduling solution likely unbalanced"
312+
);
313+
}
312314
solution.capacity_scaling_iterations = attempt_number;
313315
return solution;
314316
}

0 commit comments

Comments
 (0)