-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Release GIL in prepare_actor_checkpoint #4208
Conversation
Test FAILed. |
# PrepareActorCheckpoint will wait for raylet's reply, release | ||
# the GIL so other Python threads can run. | ||
with nogil: | ||
check_status(self.client.get().PrepareActorCheckpoint( |
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.
Is PrepareActorCheckpoint
a blocking call, which waits for a response from the raylet? If yes, then we definitely need to release the GIL. If not, then we could still release the GIL, though in that case there are many other methods like this where we should release the GIL.
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.
Ok, I just checked and see that it waits for a response.
@@ -352,8 +352,12 @@ cdef class RayletClient: | |||
|
|||
def prepare_actor_checkpoint(self, ActorID actor_id): | |||
cdef CActorCheckpointID checkpoint_id | |||
check_status(self.client.get().PrepareActorCheckpoint( | |||
actor_id.data, checkpoint_id)) | |||
cdef CActorID c_actor_id = actor_id.data |
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.
Btw, I don't think it is necessary to do this is it? Because ActorID
should already be a C++ object.
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'm not sure about this. I thought ActorID
was a Python object.
What do these changes do?
Related issue number