Skip to content

Commit

Permalink
[Dashboard] Correct the event time of failed tasks (ray-project#46439)
Browse files Browse the repository at this point in the history
Signed-off-by: liuxsh9 <[email protected]>
  • Loading branch information
liuxsh9 authored Jul 9, 2024
1 parent a09e5ea commit cf6f636
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ray/gcs/gcs_server/gcs_task_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,13 @@ void GcsTaskManager::GcsTaskManagerStorage::MarkTasksFailedOnWorkerDead(

for (const auto &task_locator : task_attempts_itr->second) {
MarkTaskAttemptFailedIfNeeded(
task_locator, worker_failure_data.end_time_ms() * 1000, error_info);
task_locator, worker_failure_data.end_time_ms() * 1000 * 1000, error_info);
}
}

void GcsTaskManager::GcsTaskManagerStorage::MarkTaskAttemptFailedIfNeeded(
const std::shared_ptr<TaskEventLocator> &locator,
int64_t failed_ts,
int64_t failed_ts_ns,
const rpc::RayErrorInfo &error_info) {
auto &task_events = locator->GetTaskEventsMutable();
// We don't mark tasks as failed if they are already terminated.
Expand All @@ -113,7 +113,7 @@ void GcsTaskManager::GcsTaskManagerStorage::MarkTaskAttemptFailedIfNeeded(
// We could mark the task as failed even if might not have state updates yet (i.e. only
// profiling events are reported).
auto state_updates = task_events.mutable_state_updates();
(*state_updates->mutable_state_ts())[ray::rpc::TaskStatus::FAILED] = failed_ts;
(*state_updates->mutable_state_ts())[ray::rpc::TaskStatus::FAILED] = failed_ts_ns;
state_updates->mutable_error_info()->CopyFrom(error_info);
}

Expand Down

0 comments on commit cf6f636

Please sign in to comment.