Skip to content
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] Streaming generator task waits for all object report acks before finishing the task #44092

Merged
merged 1 commit into from
Mar 18, 2024

Conversation

stephanie-wang
Copy link
Contributor

@stephanie-wang stephanie-wang commented Mar 18, 2024

Why are these changes needed?

Cherry-pick #44079, fixes for #43914 and #43978.

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
    • I've added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

…re finishing the task (ray-project#44079)

This fixes a bug in handling task (worker process) failures for streaming generator tasks. Streaming generator executors report the values of the dynamic returns to the caller asynchronously during the task execution. If a report is lost, then the caller will not be able to get the value of the yield'ed ObjectRef. Therefore, we need to wait until all in-flight object reports have been acked before we can finish the streaming generator task. Otherwise, it is possible for the caller to think that the task has finished, but then the executor dies before it can report the dynamic return object's value.

Also cleans up some generator_waiter.cc headers, etc.

Signed-off-by: Stephanie Wang <[email protected]>
@stephanie-wang stephanie-wang changed the title Cherry-pick #44079 [core] Streaming generator task waits for all object report acks before finishing the task Mar 18, 2024
@stephanie-wang stephanie-wang changed the base branch from master to releases/2.10.0 March 18, 2024 18:31
@zhe-thoughts
Copy link
Collaborator

@stephanie-wang we are pretty late into the release cycle. How critical is it tp idc this one into 2.10?

@stephanie-wang
Copy link
Contributor Author

@stephanie-wang we are pretty late into the release cycle. How critical is it tp idc this one into 2.10?

We need it for Ray Data recovery. If we don't cherry-pick, I think we need to do a minor release at the very least. @c21 @raulchen can weigh in too.

@zhe-thoughts
Copy link
Collaborator

@c21 @raulchen Is this in scope for Data GA? If so we should pick (even at the cost of delaying the release)

@c21
Copy link
Contributor

c21 commented Mar 18, 2024

Is this in scope for Data GA? If so we should pick (even at the cost of delaying the release)

Yes, let's cherry pick the PR.

@raulchen
Copy link
Contributor

yes, it's a critical stability fix

Copy link
Collaborator

@zhe-thoughts zhe-thoughts left a comment

Choose a reason for hiding this comment

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

@khluu Let's pick but be careful about possible issues (e.g. release test failures)

@can-anyscale can-anyscale merged commit e032d7c into ray-project:releases/2.10.0 Mar 18, 2024
4 of 5 checks passed
@can-anyscale
Copy link
Collaborator

merged thanks all

@stephanie-wang stephanie-wang deleted the cp-44079 branch March 18, 2024 22:41
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.

5 participants