diff --git a/quickwit/quickwit-control-plane/src/indexing_plan.rs b/quickwit/quickwit-control-plane/src/indexing_plan.rs index 0b063623814..6932c1e32a1 100644 --- a/quickwit/quickwit-control-plane/src/indexing_plan.rs +++ b/quickwit/quickwit-control-plane/src/indexing_plan.rs @@ -66,6 +66,9 @@ impl PhysicalIndexingPlan { pub fn normalize(&mut self) { for tasks in self.indexing_tasks_per_indexer_id.values_mut() { + for task in tasks.iter_mut() { + task.shard_ids.sort_unstable(); + } tasks.sort_by(|left, right| { left.index_uid .cmp(&right.index_uid) 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 dab57839198..e4a750e9411 100644 --- a/quickwit/quickwit-control-plane/src/indexing_scheduler/scheduling/mod.rs +++ b/quickwit/quickwit-control-plane/src/indexing_scheduler/scheduling/mod.rs @@ -92,7 +92,7 @@ impl<'a> IdToOrdMap<'a> { .source_uid_to_source_ord .insert(source.source_uid.clone(), source_ord); assert!(previous_item.is_none()); - self.sources.push(&source); + self.sources.push(source); source_ord }