mirror of
https://github.com/wassname/ray.git
synced 2026-09-11 12:43:20 +08:00
Fix actor bug arising from overwriting task specifications in the local scheduler (#513)
* copy task specifications put into the actor task cache so it won't get overwritten when the scheduler receives the next task * cleanup * cleanup and fix * linting * fix jenkins test * fix linting
This commit is contained in:
committed by
Robert Nishihara
parent
8532ba4272
commit
1dddd5336a
@@ -112,8 +112,7 @@ struct SchedulingAlgorithmState {
|
||||
|
||||
TaskQueueEntry TaskQueueEntry_init(TaskSpec *spec, int64_t task_spec_size) {
|
||||
TaskQueueEntry elt;
|
||||
elt.spec = (TaskSpec *) malloc(task_spec_size);
|
||||
memcpy(elt.spec, spec, task_spec_size);
|
||||
elt.spec = TaskSpec_copy(spec, task_spec_size);
|
||||
elt.task_spec_size = task_spec_size;
|
||||
return elt;
|
||||
}
|
||||
@@ -833,8 +832,9 @@ void handle_task_submitted(LocalSchedulerState *state,
|
||||
|
||||
void handle_actor_task_submitted(LocalSchedulerState *state,
|
||||
SchedulingAlgorithmState *algorithm_state,
|
||||
TaskSpec *spec,
|
||||
TaskSpec *task_spec,
|
||||
int64_t task_spec_size) {
|
||||
TaskSpec *spec = TaskSpec_copy(task_spec, task_spec_size);
|
||||
ActorID actor_id = TaskSpec_actor_id(spec);
|
||||
CHECK(!ActorID_equal(actor_id, NIL_ACTOR_ID));
|
||||
|
||||
@@ -865,6 +865,7 @@ void handle_actor_task_submitted(LocalSchedulerState *state,
|
||||
state, algorithm_state, spec, task_spec_size,
|
||||
state->actor_mapping[actor_id].local_scheduler_id);
|
||||
}
|
||||
TaskSpec_free(spec);
|
||||
}
|
||||
|
||||
void handle_actor_creation_notification(
|
||||
|
||||
Reference in New Issue
Block a user