Repository navigation
[core][actor scalability] Ensure an actor is always destroyed and not restarted when its PG is removed - #67170
Draft
Yicheng-Lu-llll wants to merge 3 commits into
Conversation
Yicheng-Lu-llll
force-pushed
the
yicheng/destroy-actors-on-pg-removal
branch
5 times, most recently
from
October 20, 2026 02:18
adcbcd8 to
3805b2a
Compare
|
This pull request has been automatically marked as stale because it has not had You can always ask for help on our discussion forum or Ray's public slack channel. If you'd like to keep this open, just leave any comment, and the stale label will be removed. |
Signed-off-by: yicheng <[email protected]>
Yicheng-Lu-llll
force-pushed
the
yicheng/destroy-actors-on-pg-removal
branch
from
November 12, 2026 00:33
3805b2a to
a66bb7d
Compare
dancingactor
left a comment
Contributor
There was a problem hiding this comment.
This PR makes sense to me. Just one suggestion to reduce a performance cost this PR introduces:
This PR makes every PG removal scan all actors to find actors that belong to that PG, so the cost grows as the number of actors grows.
The fix is simple: introduce a map from PG ID to its actors in GcsActorManager.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
So, this is an issue I encountered when implementing the solution for https://docs.google.com/document/d/1D_oZLa_Ek3Uq3lAQ-kOZjvxgAl26lk-wVkQcwZnqIa0/edit?tab=t.ekgpw79rflh#heading=h.9pemchlit69d, and it needs to be fixed before moving forward.
Basically, in current Ray, people typically do:
In the current implementation, the PG removal logic hasn’t been updated for a long time and has several issues. Its current behavior is:
This causes problems like:
INTENDED_SYSTEM_EXIT, it will be restarted. Since it is tied to a specific PG ID and that PG has been removed, it will never be schedulable again and will live in the scheduling loop forever, causing overhead.So, to fix the issue and also make sure we can handle GCS restarts, the new flow is as follows:
If GCS restarts at any point after removal intention, it will see the PG removal intention first, and since all operations are idempotent, GCS would check and simply redo all of them if needed.
If GCS restarts at any point before removal intention, client would retry.