Skip to content

Properly release resources of workers exiting due to max_calls - #22146

Merged
ericl merged 10 commits into
ray-project:masterfrom
ericl:fix-max-calls
Feb 8, 2022
Merged

ericl merged 10 commits into
ray-project:masterfrom
ericl:fix-max-calls

Conversation

@ericl

@ericl ericl commented Feb 6, 2022

Copy link
Copy Markdown
Contributor

Why are these changes needed?

Previously code incorrectly assumed that an exiting worker would disconnect from the raylet promptly to release resources. This isn't the case if the worker is owning references. This PR plumbs through the right release resources call even in this scenario.

Closes #10960

@ericl ericl changed the title [WIP] Properly release resources of workers exiting due to max_calls Properly release resources of workers exiting due to max_calls Feb 6, 2022

@rkooo567 rkooo567 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.

LGTM! A couple nit comments

scheduling_key_entry.num_busy_workers--;

if (reply.worker_exiting()) {
RAY_LOG(DEBUG) << "Worker " << addr.worker_id

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.

The same logic is performed from ReturnWorker right?

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.

Yep.

Comment thread src/ray/raylet/node_manager.cc Resolved
@ericl
ericl merged commit 8f7db1c into ray-project:master Feb 8, 2022
simonsays1980 pushed a commit to simonsays1980/ray that referenced this pull request Feb 27, 2022
…roject#22146)

Previously code incorrectly assumed that an exiting worker would disconnect from the raylet promptly to release resources. This isn't the case if the worker is owning references. This PR plumbs through the right release resources call even in this scenario.

Closes ray-project#10960

Co-authored-by: SangBin Cho <[email protected]>
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.

[Core] Resources are not returned when implicitly capturing object reference with max_call arg.

3 participants