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] Use controller namespace when getting actors #23896

Merged
merged 3 commits into from
Apr 13, 2022

Conversation

shrekris-anyscale
Copy link
Contributor

Why are these changes needed?

Serve gets actors using the current Ray namespace. However, the Ray namespace and the controller namespace may not match when using the _override_controller_namespace argument in serve.start(). This change ensures that the get_actor() calls in ActorReplicaWrapper use the controller namespace. This also allows num_replicas to be scaled up and down properly when using _override_controller_namespace.

Related issue number

N/A

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
      • New unit tests are added to ensure num_replicas scales up and down correctly when using _override_controller_namespace.

@edoakes edoakes merged commit f400c20 into ray-project:master Apr 13, 2022
shrekris-anyscale added a commit to shrekris-anyscale/ray that referenced this pull request Apr 28, 2022
edoakes pushed a commit that referenced this pull request Apr 29, 2022
When Ray starts in an anonymous namespace, replicas don't shut down correctly, causing a replica leak. This change adds fixes introduced in #23896 to Ray 1.12.1, and it adds a new unit test to check replica updates in anonymous namespaces.
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.

None yet

3 participants