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

[serve] Remove unnecessary STOPPED ReplicaState #16783

Merged
merged 1 commit into from
Jul 1, 2021

Conversation

edoakes
Copy link
Contributor

@edoakes edoakes commented Jun 30, 2021

Why are these changes needed?

STOPPED is not actually used in the state machine, it's only set internally in the replicas.

Related issue number

Checks

  • 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 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 :(


def check_stopped(self) -> bool:
"""Check if the actor has exited."""
if self._stopped:
return True

try:
handle = ray.get_actor(self._actor_name)
ready, _ = ray.wait([self._drain_obj_ref], timeout=0)
Copy link
Member

Choose a reason for hiding this comment

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

What if _drain_obj_ref failed with exception ? based on what behavior of ray.wait() it will still fill up ready list with an element but we can only ensure its success via calling ray.get() ?

For this PR it's not changed however so not blocking.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes that's right

@edoakes edoakes merged commit 691f0a1 into ray-project:master Jul 1, 2021
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.

2 participants