Merge pull request #3225 from filecoin-project/fix/sched-missing-worker
check that worker referenced by task is actually still there.
This commit is contained in:
commit
4311c96a44
7
extern/sector-storage/sched.go
vendored
7
extern/sector-storage/sched.go
vendored
@ -295,7 +295,12 @@ func (sh *scheduler) trySched() {
|
|||||||
|
|
||||||
task.indexHeap = sqi
|
task.indexHeap = sqi
|
||||||
for wnd, windowRequest := range sh.openWindows {
|
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
|
// TODO: allow bigger windows
|
||||||
if !windows[wnd].allocated.canHandleRequest(needRes, windowRequest.worker, worker.info.Resources) {
|
if !windows[wnd].allocated.canHandleRequest(needRes, windowRequest.worker, worker.info.Resources) {
|
||||||
|
Loading…
Reference in New Issue
Block a user