From 0390ba10a3e46313b8c60856b808f4792b39ccb1 Mon Sep 17 00:00:00 2001 From: Paul Masurel Date: Mon, 15 Jan 2024 15:01:18 +0900 Subject: [PATCH] Avoiding creating pipeline when no shard --- .../src/indexing_scheduler/scheduling/mod.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/quickwit/quickwit-control-plane/src/indexing_scheduler/scheduling/mod.rs b/quickwit/quickwit-control-plane/src/indexing_scheduler/scheduling/mod.rs index 9009f85c79c..6cf8f99191a 100644 --- a/quickwit/quickwit-control-plane/src/indexing_scheduler/scheduling/mod.rs +++ b/quickwit/quickwit-control-plane/src/indexing_scheduler/scheduling/mod.rs @@ -197,6 +197,9 @@ fn convert_scheduling_solution_to_physical_plan_single_node_single_source( mut previous_tasks: &[&IndexingTask], source: &SourceToSchedule, ) -> Vec { + if remaining_num_shards_to_schedule_on_node == 0 { + return Vec::new(); + } match &source.source_type { SourceToScheduleType::Sharded { shard_ids,