ray
ray copied to clipboard
[Core] fix flaky reference count test by cleaning up borrowed references if actor is killed before dependencies are not resolved
Why are these changes needed?
When a actor is killed before dependencies are resolved, it doesn't send the reply to the caller (there's a wrong assumption here), and the caller doesn't call proper APIs to clean up borrowed references. This PR fixes the issue by sending a reply when actor is killed before dependencies are resolved and calling FailPendingTask, which in turns clean up borrowed references.
Related issue number
Closes https://github.com/ray-project/ray/issues/48087
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 added any new APIs to the API Reference. For example, if I added a
method in Tune, I've added it in
- [ ] 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 :(