Skip to content

[Serve] Refactor BackendState#13406

Merged
edoakes merged 21 commits intoray-project:masterfrom
ijrsvt:refactor-backend-state
Jan 21, 2021
Merged

[Serve] Refactor BackendState#13406
edoakes merged 21 commits intoray-project:masterfrom
ijrsvt:refactor-backend-state

Conversation

@ijrsvt
Copy link
Copy Markdown
Contributor

@ijrsvt ijrsvt commented Jan 13, 2021

Why are these changes needed?

  • Refactor's BackendState to explicitly keep track of replicas in each state. Rather than having ~5 datastructures (Backend->Replicas in State 1, Backend->Replicas in State 2), we will just have one datastructure that maps from Backend-> State -> Replicas

Related issue number

Closes #13155

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

Comment on lines 166 to 167
self._state = ReplicaState.STOPPED
return True
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
self._state = ReplicaState.STOPPED
return True
# The next call to `check_stopped` will return True on the `get_actor` call.
return False

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

we should not transition the replica to "STOPPED" here because we probably want to repeatedly log and send the kill request until the replica actually exits

cc @edoakes

@edoakes edoakes merged commit 6803874 into ray-project:master Jan 21, 2021
@ijrsvt ijrsvt deleted the refactor-backend-state branch January 21, 2021 17:18
amogkam added a commit that referenced this pull request Jan 22, 2021
fishbone added a commit to fishbone/ray that referenced this pull request Feb 16, 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.

3 participants