Harden unload for empty runners
This commit is contained in:
parent
68dfc6236a
commit
48702dd149
1 changed files with 4 additions and 0 deletions
|
@ -588,6 +588,10 @@ func (s *Scheduler) findRunnerToUnload() *runnerRef {
|
|||
runnerList = append(runnerList, r)
|
||||
}
|
||||
s.loadedMu.Unlock()
|
||||
if len(runnerList) == 0 {
|
||||
slog.Debug("no loaded runner to unload")
|
||||
return nil
|
||||
}
|
||||
|
||||
// In the future we can enhance the algorithm to be smarter about picking the optimal runner to unload
|
||||
// e.g., if we have multiple options, will one make room for the request?
|
||||
|
|
Loading…
Reference in a new issue