-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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] Fix object reconstruction hang on arguments pending creation #47645
Conversation
Signed-off-by: Jiajun Yao <jeromeyjj@gmail.com>
cc @Catch-Bull could you review the PR when you get a chance? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks reasonable. can we make sure some release tests that test lineage reconstruction pass before merging?
// Post to the event loop to maintain the async nature of | ||
// SubmitTask and avoid issues like | ||
// https://github.com/ray-project/ray/issues/47606. | ||
io_service_.post( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ehh, we do have code that relies on the behavior that this piece of code is executed immediately instead of being posted to the event loop:
def is_shutdown(self) -> bool:
"""Return whether the proxy actor is shutdown.
If the actor is dead, the health check will return RayActorError.
"""
try:
ray.get(self._actor_handle.check_health.remote(), timeout=0)
except RayActorError:
# The actor is dead, so it's ready for shutdown.
return True
# The actor is still alive, so it's not ready for shutdown.
return False
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the new approach makes sense.
…ay-project#47645) Signed-off-by: Jiajun Yao <jeromeyjj@gmail.com> Signed-off-by: ujjawal-khare <ujjawal.khare@dream11.com>
…ay-project#47645) Signed-off-by: Jiajun Yao <jeromeyjj@gmail.com> Signed-off-by: ujjawal-khare <ujjawal.khare@dream11.com>
…ay-project#47645) Signed-off-by: Jiajun Yao <jeromeyjj@gmail.com> Signed-off-by: ujjawal-khare <ujjawal.khare@dream11.com>
…ay-project#47645) Signed-off-by: Jiajun Yao <jeromeyjj@gmail.com> Signed-off-by: ujjawal-khare <ujjawal.khare@dream11.com>
…ay-project#47645) Signed-off-by: Jiajun Yao <jeromeyjj@gmail.com> Signed-off-by: ujjawal-khare <ujjawal.khare@dream11.com>
…ay-project#47645) Signed-off-by: Jiajun Yao <jeromeyjj@gmail.com> Signed-off-by: ujjawal-khare <ujjawal.khare@dream11.com>
…ay-project#47645) Signed-off-by: Jiajun Yao <jeromeyjj@gmail.com> Signed-off-by: ujjawal-khare <ujjawal.khare@dream11.com>
…ay-project#47645) Signed-off-by: Jiajun Yao <jeromeyjj@gmail.com> Signed-off-by: ujjawal-khare <ujjawal.khare@dream11.com>
…ay-project#47645) Signed-off-by: Jiajun Yao <jeromeyjj@gmail.com> Signed-off-by: ujjawal-khare <ujjawal.khare@dream11.com>
Why are these changes needed?
Currently inside
ObjectRecoveryManager::ReconstructObject
we haveThe object being recovered will have pending_creation set to true and it will be set to false after the resubmitted task finishes (succeed or fail) when
ReferenceCounter::UpdateFinishedTaskReferences
is called. However if the task is an actor task and the actor is dead,ReferenceCounter::UpdateFinishedTaskReferences
will be called BEFOREResubmitTask
returns. So basically, we setpending_creation
to false first and then set to true which is obviously wrong. This PR fixes this issue by settingpending_creation
to true BEFORE callingtask_resubmitter_->ResubmitTask(task_id, &task_deps)
so that if the actor is dead,pending_creation
will be set to false insideResubmitTask()
.Related issue number
Closes #47606
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/
under thecorresponding
.rst
file.