Skip to content

[Serve] Refactor BackendState - #13406

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

edoakes merged 21 commits into
ray-project:masterfrom
ijrsvt:refactor-backend-state

Conversation

@ijrsvt

@ijrsvt ijrsvt commented Jan 13, 2021 •

Copy link
Copy Markdown
Contributor

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

Comment thread python/ray/serve/backend_state.py Resolved
Comment thread python/ray/serve/backend_state.py Resolved
Comment thread python/ray/serve/backend_state.py Resolved
Comment thread python/ray/serve/backend_state.py Resolved
Comment thread python/ray/serve/backend_state.py Resolved
Comment thread python/ray/serve/backend_state.py Resolved
Comment thread python/ray/serve/backend_state.py Resolved
Comment thread python/ray/serve/backend_state.py Resolved
Comment thread python/ray/serve/backend_state.py Resolved
Comment thread python/ray/serve/backend_state.py Resolved
Comment thread python/ray/serve/backend_state.py Resolved
Comment thread python/ray/serve/backend_state.py Resolved
Comment thread python/ray/serve/backend_state.py Resolved
Comment thread python/ray/serve/tests/test_api.py Resolved
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

Comment thread python/ray/serve/config.py Resolved
Comment thread python/ray/serve/backend_state.py Resolved
@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