Skip to content

Commit 4e8ca5d

Browse files
Fixed small problem with tasks that are too large to schedule never finishing. (#264)
1 parent 15730a8 commit 4e8ca5d

File tree

1 file changed

+4
-1
lines changed
  • opendc-compute/opendc-compute-simulator/src/main/java/org/opendc/compute/simulator/service

1 file changed

+4
-1
lines changed

Diff for: opendc-compute/opendc-compute-simulator/src/main/java/org/opendc/compute/simulator/service/ComputeService.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -463,10 +463,13 @@ private void doSchedule() {
463463
// Remove the incoming image
464464
taskQueue.poll();
465465
tasksPending--;
466+
tasksTerminated++;
466467

467468
LOGGER.warn("Failed to spawn {}: does not fit", task);
468469

469-
task.setState(TaskState.FAILED);
470+
task.setState(TaskState.TERMINATED);
471+
472+
this.setTaskToBeRemoved(task);
470473
continue;
471474
} else {
472475
break;

0 commit comments

Comments
 (0)