check that worker referenced by task is actually still there.

This commit is contained in:
whyrusleeping 2020-08-21 10:33:36 -07:00
parent 8df9c483f3
commit 54862be3ff

View File

@ -295,7 +295,12 @@ func (sh *scheduler) trySched() {
task.indexHeap = sqi
for wnd, windowRequest := range sh.openWindows {
worker := sh.workers[windowRequest.worker]
worker, ok := sh.workers[windowRequest.worker]
if !ok {
log.Errorf("worker referenced by windowRequest not found (worker: %d)", windowRequest.worker)
// TODO: How to move forward here?
continue
}
// TODO: allow bigger windows
if !windows[wnd].allocated.canHandleRequest(needRes, windowRequest.worker, worker.info.Resources) {