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] Add more message when accessing a dead actor. #34697

Merged
merged 17 commits into from
Apr 26, 2023

Conversation

fishbone
Copy link
Contributor

@fishbone fishbone commented Apr 22, 2023

Why are these changes needed?

When any ray worker access the actor which doesn't belong to the cluster, it'll crash. This is really bad user experience because:

  • The user will lose ray worker or driver.
  • The error message is not very useful.

This PR fixed it by avoiding crash and throw exception instead. When the user accidentially access an actor which doesn't belong to this cluster, it'll get an Exception with message: It might be dead or it's from a different cluster.

This PR also deleted some code that's not useful.

Related issue number

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
    • I've added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

Signed-off-by: Yi Cheng <[email protected]>
Signed-off-by: Yi Cheng <[email protected]>
@fishbone fishbone linked an issue Apr 22, 2023 that may be closed by this pull request
Signed-off-by: Yi Cheng <[email protected]>
Signed-off-by: Yi Cheng <[email protected]>
@fishbone fishbone marked this pull request as ready for review April 24, 2023 18:34
Copy link
Contributor

@rkooo567 rkooo567 left a comment

Choose a reason for hiding this comment

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

LGTM. just NITs for error message improvement

name = "exported_internal",
srcs = glob(
[
"src/ray/internal/internal.cc",
Copy link
Contributor

Choose a reason for hiding this comment

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

Guess it is unrelated changes? Looks okay to include in this PR to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually it is... There is some method used in this file got impacted by this PR. So when I compile it just failed :(
I notice it seems not useful, so just delete that file.

src/ray/core_worker/core_worker.cc Outdated Show resolved Hide resolved
src/ray/core_worker/core_worker.cc Outdated Show resolved Hide resolved
@rkooo567 rkooo567 added the @author-action-required The PR author is responsible for the next step. Remove tag to send back to the reviewer. label Apr 25, 2023
@fishbone fishbone merged commit d3b9d26 into ray-project:master Apr 26, 2023
ProjectsByJackHe pushed a commit to ProjectsByJackHe/ray that referenced this pull request May 4, 2023
## Why are these changes needed?
When any ray worker access the actor which doesn't belong to the cluster, it'll crash. This is really bad user experience because:

- The user will lose ray worker or driver.
- The error message is not very useful.

This PR fixed it by avoiding crash and throw exception instead. When the user accidentially access an actor which doesn't belong to this cluster, it'll get an Exception with message: `It might be dead or it's from a different cluster`.

This PR also deleted some code that's not useful.

Signed-off-by: Jack He <[email protected]>
architkulkarni pushed a commit to architkulkarni/ray that referenced this pull request May 16, 2023
## Why are these changes needed?
When any ray worker access the actor which doesn't belong to the cluster, it'll crash. This is really bad user experience because:

- The user will lose ray worker or driver.
- The error message is not very useful.

This PR fixed it by avoiding crash and throw exception instead. When the user accidentially access an actor which doesn't belong to this cluster, it'll get an Exception with message: `It might be dead or it's from a different cluster`.

This PR also deleted some code that's not useful.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@author-action-required The PR author is responsible for the next step. Remove tag to send back to the reviewer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Core] improve error message on calling a dead actor
3 participants