Skip to content

Conversation

@edoakes
Copy link
Collaborator

@edoakes edoakes commented Jul 31, 2025

The NotifyUnblocked naming is legacy from before Ray 1.0.

Also removed task_id from various places that we didn't need it.

Note there is an ongoing bugfix to cancel only the specific get request instead of all requests for the worker: #54495

edoakes added 5 commits July 30, 2025 16:32
Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
@edoakes edoakes requested a review from a team as a code owner July 31, 2025 00:19
@edoakes edoakes added the go add ONLY when ready to merge, run all tests label Jul 31, 2025
Copy link
Contributor

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

Choose a reason for hiding this comment

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

Summary of Changes

Hello @edoakes, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request primarily focuses on refactoring and clarifying the communication protocols between Ray workers and the raylet, specifically concerning object fetching and waiting. It renames a key message type to better reflect its intent and simplifies the API for managing object dependencies, leading to a more robust and understandable codebase.

Highlights

  • Core Renaming: The primary change involves renaming the NotifyUnblocked message type and associated functions to CancelGetRequest. This clarifies the intent of the message, which is to cancel outstanding object get requests rather than simply notifying that a worker is unblocked.
  • API Simplification: The task_id parameter has been removed from FetchOrReconstruct and Wait calls across the core worker, raylet client, and raylet components. This simplifies the API by removing a redundant identifier for these operations.
  • Object Resolution Refactoring: The internal AsyncResolveObjects and AsyncResolveObjectsFinish functions within the NodeManager have been consolidated and refactored into a single AsyncGetOrWait function. This streamlines the logic for handling object fetching and waiting requests from workers, making the dependency management more cohesive.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments or fill out our survey to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

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

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 is a nice refactoring that renames NotifyUnblocked to the more descriptive CancelGetRequest and simplifies the related logic by removing task_id from several messages and functions. The new function AsyncGetOrWait is also a good improvement in terms of clarity.

However, I have a significant concern about removing task_id from the wire protocol for FetchOrReconstruct, CancelGetRequest, and WaitRequest. This change makes it impossible to distinguish between dependency requests from different concurrent tasks within the same worker (e.g., in an async actor). This could lead to correctness issues where one task's operation (like a get completing) inadvertently cancels another task's pending operation. I've left a few comments on the flatbuffer schema changes to discuss this further. If this is not a concern, the rest of the changes look solid.

Copy link
Contributor

@dayshah dayshah left a comment

Choose a reason for hiding this comment

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

I finally understand what NotifyUnblocked did

Also probably needs a better description for big change of not cancelling gets when we finish wait

@edoakes
Copy link
Collaborator Author

edoakes commented Jul 31, 2025

@dayshah I'll make this a pure refactor and split out the behavior change per discussion

Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
@edoakes
Copy link
Collaborator Author

edoakes commented Jul 31, 2025

@dayshah I updated the PR to revert the behavior change and will do that separately.

edoakes added 5 commits August 1, 2025 15:28
Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
@edoakes edoakes requested a review from dayshah August 4, 2025 18:43
@edoakes edoakes enabled auto-merge (squash) August 4, 2025 20:07
@edoakes edoakes requested a review from a team August 4, 2025 20:07
@edoakes edoakes merged commit b2415c8 into ray-project:master Aug 4, 2025
6 checks passed
kamil-kaczmarek pushed a commit that referenced this pull request Aug 4, 2025
The `NotifyUnblocked` naming is legacy from before Ray 1.0.

Also removed `task_id` from various places that we didn't need it.

Note there is an ongoing bugfix to cancel only the specific get request
instead of all requests for the worker:
#54495

---------

Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
Signed-off-by: Kamil Kaczmarek <kamil@anyscale.com>
mjacar pushed a commit to mjacar/ray that referenced this pull request Aug 5, 2025
)

The `NotifyUnblocked` naming is legacy from before Ray 1.0.

Also removed `task_id` from various places that we didn't need it.

Note there is an ongoing bugfix to cancel only the specific get request
instead of all requests for the worker:
ray-project#54495

---------

Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
Signed-off-by: Michael Acar <michael.j.acar@gmail.com>
elliot-barn pushed a commit that referenced this pull request Aug 5, 2025
The `NotifyUnblocked` naming is legacy from before Ray 1.0.

Also removed `task_id` from various places that we didn't need it.

Note there is an ongoing bugfix to cancel only the specific get request
instead of all requests for the worker:
#54495

---------

Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>
sampan-s-nayak pushed a commit that referenced this pull request Aug 12, 2025
The `NotifyUnblocked` naming is legacy from before Ray 1.0.

Also removed `task_id` from various places that we didn't need it.

Note there is an ongoing bugfix to cancel only the specific get request
instead of all requests for the worker:
#54495

---------

Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
Signed-off-by: sampan <sampan@anyscale.com>
jugalshah291 pushed a commit to jugalshah291/ray_fork that referenced this pull request Sep 11, 2025
)

The `NotifyUnblocked` naming is legacy from before Ray 1.0.

Also removed `task_id` from various places that we didn't need it.

Note there is an ongoing bugfix to cancel only the specific get request
instead of all requests for the worker:
ray-project#54495

---------

Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
Signed-off-by: jugalshah291 <shah.jugal291@gmail.com>
dstrodtman pushed a commit to dstrodtman/ray that referenced this pull request Oct 6, 2025
)

The `NotifyUnblocked` naming is legacy from before Ray 1.0.

Also removed `task_id` from various places that we didn't need it.

Note there is an ongoing bugfix to cancel only the specific get request
instead of all requests for the worker:
ray-project#54495

---------

Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
Signed-off-by: Douglas Strodtman <douglas@anyscale.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants