Skip to content

Commit

Permalink
[Core] Task status should start with PENDING_ARGS_AVAIL when retry (r…
Browse files Browse the repository at this point in the history
…ay-project#46494)

Signed-off-by: Jiajun Yao <jeromeyjj@gmail.com>
  • Loading branch information
jjyao authored Jul 9, 2024
1 parent 8f70e02 commit c9b14d7
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/ray/core_worker/task_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1395,9 +1395,10 @@ void TaskManager::MarkDependenciesResolved(const TaskID &task_id) {
if (it == submissible_tasks_.end()) {
return;
}
if (it->second.GetStatus() == rpc::TaskStatus::PENDING_ARGS_AVAIL) {
SetTaskStatus(it->second, rpc::TaskStatus::PENDING_NODE_ASSIGNMENT);
}

RAY_CHECK(it->second.GetStatus() == rpc::TaskStatus::PENDING_ARGS_AVAIL)
<< ", task ID = " << it->first << ", status = " << it->second.GetStatus();
SetTaskStatus(it->second, rpc::TaskStatus::PENDING_NODE_ASSIGNMENT);
}

void TaskManager::MarkTaskWaitingForExecution(const TaskID &task_id,
Expand Down Expand Up @@ -1458,12 +1459,12 @@ void TaskManager::MarkTaskRetryOnFailed(TaskEntry &task_entry,
task_entry.MarkRetryOnFailed();

// Mark the new status and also include task spec info for the new attempt.
task_entry.SetStatus(rpc::TaskStatus::PENDING_NODE_ASSIGNMENT);
task_entry.SetStatus(rpc::TaskStatus::PENDING_ARGS_AVAIL);
RAY_UNUSED(RecordTaskStatusEventIfNeeded(task_entry.spec.TaskId(),
task_entry.spec.JobId(),
task_entry.spec.AttemptNumber() + 1,
task_entry.spec,
rpc::TaskStatus::PENDING_NODE_ASSIGNMENT,
rpc::TaskStatus::PENDING_ARGS_AVAIL,
/* include_task_info */ true));
}

Expand Down

0 comments on commit c9b14d7

Please sign in to comment.