Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Dashboard] Correct the event time of failed tasks #46439

Merged
merged 4 commits into from
Jul 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading