Skip to content

Commit

Permalink
As spotted by @guilload, we need to sort shards in indexing tasks. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
fulmicoton authored Jan 15, 2024
1 parent 2c21350 commit 2251e93
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions quickwit/quickwit-control-plane/src/indexing_plan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 2251e93

Please sign in to comment.