-
Notifications
You must be signed in to change notification settings - Fork 7k
[core] Rename NotifyUnblocked to CancelGetRequest
#55081
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[core] Rename NotifyUnblocked to CancelGetRequest
#55081
Conversation
There was a problem hiding this 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
NotifyUnblockedmessage type and associated functions toCancelGetRequest. This clarifies the intent of the message, which is to cancel outstanding objectgetrequests rather than simply notifying that a worker is unblocked. - API Simplification: The
task_idparameter has been removed fromFetchOrReconstructandWaitcalls 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
AsyncResolveObjectsandAsyncResolveObjectsFinishfunctions within theNodeManagerhave been consolidated and refactored into a singleAsyncGetOrWaitfunction. 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
-
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. ↩
There was a problem hiding this 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.
dayshah
left a comment
There was a problem hiding this 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
|
@dayshah I'll make this a pure refactor and split out the behavior change per discussion |
|
@dayshah I updated the PR to revert the behavior change and will do that separately. |
…es/rename-notify-unblocked
…es/rename-notify-unblocked
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>
) 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>
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>
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>
) 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>
) 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>
The
NotifyUnblockednaming is legacy from before Ray 1.0.Also removed
task_idfrom 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