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

Release GIL in prepare_actor_checkpoint #4208

Merged
merged 1 commit into from
Mar 2, 2019

Conversation

raulchen
Copy link
Contributor

@raulchen raulchen commented Mar 1, 2019

What do these changes do?

Related issue number

@raulchen raulchen requested a review from pcmoritz March 1, 2019 07:25
@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/12413/
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(
Copy link
Collaborator

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.

Copy link
Collaborator

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.

@robertnishihara robertnishihara merged commit 48f6cd3 into ray-project:master Mar 2, 2019
@@ -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
Copy link
Collaborator

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.

Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants