File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
quickwit/quickwit-control-plane/src/indexing_scheduler/scheduling Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -417,17 +417,14 @@ fn place_unassigned_shards_single_source(
417417 for PlacementCandidate {
418418 indexer_ord,
419419 available_capacity,
420+ current_num_shards,
420421 ..
421422 } in sorted_candidates
422423 {
423- let current_num_shards_for_indexer_and_source = * solution. indexer_assignments [ * indexer_ord]
424- . num_shards_per_source
425- . get ( & source. source_ord )
426- . unwrap_or ( & 0 ) ;
427424 let num_placable_shards_for_available_capacity =
428425 available_capacity. cpu_millis ( ) / source. load_per_shard ;
429- let num_placable_shards_for_limit = limit_num_shards_per_indexer_per_source
430- . saturating_sub ( current_num_shards_for_indexer_and_source ) ;
426+ let num_placable_shards_for_limit =
427+ limit_num_shards_per_indexer_per_source . saturating_sub ( * current_num_shards ) ;
431428 let num_shards_to_place = num_shards
432429 . min ( num_placable_shards_for_available_capacity)
433430 . min ( num_placable_shards_for_limit) ;
You can’t perform that action at this time.
0 commit comments