Skip to content

Commit

Permalink
Always schedule at least one job onto a core (#1990)
Browse files Browse the repository at this point in the history
Even if the host configuration is returning `0` for the `lookahead`, we
should schedule at least one job on a core if the core exists.
  • Loading branch information
bkchr authored Oct 23, 2023
1 parent 5ca909c commit 676bacd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions polkadot/runtime/parachains/src/scheduler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -627,8 +627,8 @@ impl<T: Config> Pallet<T> {
if ValidatorGroups::<T>::decode_len().map_or(true, |l| l == 0) {
return
}

let n_lookahead = Self::claimqueue_lookahead();
// If there exists a core, ensure we schedule at least one job onto it.
let n_lookahead = Self::claimqueue_lookahead().max(1);
let n_session_cores = T::AssignmentProvider::session_core_count();
let cq = ClaimQueue::<T>::get();
let ttl = <configuration::Pallet<T>>::config().on_demand_ttl;
Expand Down

0 comments on commit 676bacd

Please sign in to comment.