Skip to content

[Core] Fix issue #68611. During recovery, rebuild the in-memory references from the persisted metadata. - #68622

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

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

Conversation

@Pengkun-ZHU

@Pengkun-ZHU Pengkun-ZHU commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Description

This is also a follow-up of PR #67417. This very issue is also encountered after I resolve the dead node trouble.

In my use case, this issue causes two problems below.

  • Package leak: when a job or detached actor later finished, GCS had no reference to remove, so the package remains in storage indefinitely.
  • Premature deletion: if a new job began using a package still needed by a pre-restart job, the count only reflected the new job. When it finished, GCS could delete the package while the original job still needed it.

I can extend test coverage for these two issues after this approach is examined and approved.

Related issues

Fix #68611.

Additional information

@Pengkun-ZHU
Pengkun-ZHU requested a review from a team as a code owner November 28, 2026 11:12

@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 initialization processes in GcsActorManager and GcsJobManager to register URI references with the runtime_env_manager_ for detached actors and running jobs, respectively. The feedback recommends checking if the actor task specification actually contains runtime environment information before calling AddURIReference in GcsActorManager to prevent unnecessary overhead and maintain consistency with the job manager's implementation.

Comment on lines +1801 to +1804
if (actor->IsDetached()) {
runtime_env_manager_.AddURIReference(
actor->GetActorID().Hex(), actor_task_spec.runtime_env_info());
}

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.

medium

To avoid unnecessary overhead and maintain consistency with the job manager's implementation, we should check if the actor task specification actually contains runtime environment information before calling AddURIReference. This prevents invoking the reference manager with empty runtime environment metadata.

      if (actor->IsDetached() && actor_task_spec.has_runtime_env_info()) {\n        runtime_env_manager_.AddURIReference(\n            actor->GetActorID().Hex(), actor_task_spec.runtime_env_info());\n      }

…emory references from the persisted metadata

Signed-off-by: pzhu <[email protected]>
@Pengkun-ZHU
Pengkun-ZHU force-pushed the user-pzhu-issues68611 branch from 28ad519 to cce6ad2 Compare November 28, 2026 11:32
@ray-gardener ray-gardener Bot added core Issues that should be addressed in Ray Core community-contribution Contributed by the community labels Nov 28, 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

1 participant