Skip to content

Commit a22e406

Browse files
committed
fix non-determinism in deadlines
1 parent 7e19fd1 commit a22e406

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

rpc/service.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -448,11 +448,12 @@ async def RegisterTaskGraph(self, request, context):
448448
success=False, message=msg, num_executors=0
449449
)
450450

451+
task_graph = job_graph.get_next_task_graph(
452+
start_time=release_time,
453+
_flags=FLAGS,
454+
)
455+
451456
def gen(release_time):
452-
task_graph = job_graph.get_next_task_graph(
453-
start_time=release_time,
454-
_flags=FLAGS,
455-
)
456457
return task_graph, stage_id_mapping
457458

458459
else:
@@ -485,6 +486,10 @@ async def RegisterEnvironmentReady(self, request, context):
485486

486487
r = self._registered_applications[request.id]
487488
r.generate_task_graph(stime)
489+
for task in r.task_graph:
490+
d = stime - task._release_time
491+
task._release_time = stime
492+
task.update_deadline(task.deadline+d)
488493

489494
with self._lock:
490495
self._simulator._workload.add_task_graph(r.task_graph)

0 commit comments

Comments
 (0)