Skip to content

Commit 676bacd

Browse files
authored
Always schedule at least one job onto a core (#1990)
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.
1 parent 5ca909c commit 676bacd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

polkadot/runtime/parachains/src/scheduler.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -627,8 +627,8 @@ impl<T: Config> Pallet<T> {
627627
if ValidatorGroups::<T>::decode_len().map_or(true, |l| l == 0) {
628628
return
629629
}
630-
631-
let n_lookahead = Self::claimqueue_lookahead();
630+
// If there exists a core, ensure we schedule at least one job onto it.
631+
let n_lookahead = Self::claimqueue_lookahead().max(1);
632632
let n_session_cores = T::AssignmentProvider::session_core_count();
633633
let cq = ClaimQueue::<T>::get();
634634
let ttl = <configuration::Pallet<T>>::config().on_demand_ttl;

0 commit comments

Comments
 (0)