Skip to content

[Core] Prevent placement group resource leaks after GCS restart - #68642

Open
Pengkun-ZHU wants to merge 1 commit into
ray-project:masterfrom
Pengkun-ZHU:user-pzhu-issue68639
Open

Pengkun-ZHU wants to merge 1 commit into
ray-project:masterfrom
Pengkun-ZHU:user-pzhu-issue68639

Conversation

@Pengkun-ZHU

Copy link
Copy Markdown
Contributor

Description

If an actor creates a non-detached placement group and exits while its job is still running, Ray correctly keeps the group. Before this change, if GCS restarted before the job exited, it could forget the actor had died. When the job finished, GCS would leave the group’s bundles reserved instead of releasing them.

This PR persists the creator actor’s death and reconciles ownership against the stored actor and job records during recovery. GCS now checks whether a placement group should be removed before retaining its bundles or recommitting a PREPARED group.

Related issues

Fixes #68639.

Additional information

@Pengkun-ZHU
Pengkun-ZHU requested a review from a team as a code owner November 29, 2026 06:41

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates the GCS placement group manager to reconcile and persist the death of a placement group's creator actor and job across GCS restarts. Specifically, during initialization, the manager now checks the status of the creator actor and job, marks them as dead if they are missing or dead in the GCS initialization data, and persists this state to the placement group table storage if the placement group is not detached. Additionally, tests have been updated to verify this new reconciliation behavior. There are no review comments, so I have no feedback to provide.

@ray-gardener ray-gardener Bot added core Issues that should be addressed in Ray Core community-contribution Contributed by the community labels Nov 29, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution Contributed by the community core Issues that should be addressed in Ray Core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Core] GCS restart between creator actor death and job exit leaves placement-group bundles reserved

1 participant