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

[core] Minor update on task manager #49272

Merged
merged 1 commit into from
Dec 18, 2024

Conversation

dentiny
Copy link
Contributor

@dentiny dentiny commented Dec 14, 2024

As usual, perform some minor C++ optimization / cleanup for task manager.

Signed-off-by: hjiang <hjiang@anyscale.com>
@dentiny dentiny added the go add ONLY when ready to merge, run all tests label Dec 14, 2024
@dentiny dentiny requested review from jjyao and dayshah December 14, 2024 11:10
}
}
}
if (!resubmit) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Main change here, follows best practice to early return.

@@ -304,6 +304,8 @@ std::vector<rpc::ObjectReference> TaskManager::AddPendingTask(
}

bool TaskManager::ResubmitTask(const TaskID &task_id, std::vector<ObjectID> *task_deps) {
RAY_CHECK(task_deps->empty());
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add an assertion before emplace.

@@ -268,8 +268,9 @@ class TaskManager : public TaskFinisherInterface, public TaskResubmissionInterfa
/// responsible for making sure that these dependencies become available, so
/// that the resubmitted task can run. This is only populated if the task was
/// not already pending and was successfully resubmitted.
/// \return OK if the task was successfully resubmitted or was
/// already pending, Invalid if the task spec is no longer present.
/// \return true if the task was successfully resubmitted (task or actor being
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jjyao I actually have a question on how we retry and retrieve retry result, task manager only submit task, but not blocking wait their completion; task recovery manager also doesn't block wait. Is there any concern?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed offline. It doesn't block, it's async operation.

@jjyao jjyao merged commit 5a98393 into ray-project:master Dec 18, 2024
4 checks passed
simonsays1980 pushed a commit to simonsays1980/ray that referenced this pull request Dec 18, 2024
Signed-off-by: hjiang <hjiang@anyscale.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go add ONLY when ready to merge, run all tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants