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

[Object spilling] Fix race condition that deletes files at the wrong timing. #16153

Merged
merged 5 commits into from
Jun 7, 2021

Conversation

rkooo567
Copy link
Contributor

@rkooo567 rkooo567 commented May 30, 2021

Why are these changes needed?

TODO: cpp unit test

The issue was that we add ref count “after” spilled url is updated to the owner (after RPC). So this could’ve happened.

file A: object A, B, C
object A, B, C are concurrently waiting for url to be updated to the owner
object A url is updated
object A updates ref count
object A is evicted
we try to delete the file. Check ref count to see if it is 0
ref count == 1 -> 0, so we delete the file A  (which shouldn’t happen because object B and C are not evicted yet)

I think we could easily fix the issue by updating ref counting before updating urls

Related issue number

Checks

  • 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 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 :(

@rkooo567 rkooo567 changed the title [WIP][Object spilling] Fix race condition that deletes files at the wrong timing. [Object spilling] Fix race condition that deletes files at the wrong timing. Jun 1, 2021
Copy link
Contributor

@stephanie-wang stephanie-wang left a comment

Choose a reason for hiding this comment

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

Nice catch! Yes, a regression test would be good.

@rkooo567 rkooo567 added the @author-action-required The PR author is responsible for the next step. Remove tag to send back to the reviewer. label Jun 1, 2021
@rkooo567 rkooo567 removed the @author-action-required The PR author is responsible for the next step. Remove tag to send back to the reviewer. label Jun 6, 2021
@rkooo567 rkooo567 merged commit f867c27 into ray-project:master Jun 7, 2021
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.

None yet

2 participants