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

Recursive deletion can lead to phantom read until the file cache expires #17741

Open
jiacheliu3 opened this issue Jul 6, 2023 · 0 comments
Open
Labels
type-feature This issue is a feature request

Comments

@jiacheliu3
Copy link
Contributor

Is your feature request related to a problem? Please describe.
In Dora the file metadata is cached.

Imagine the below sequence:

  1. We have file /a/b/c in Dora and by alluxio fs ls /a/b/c, the file metadata is cached in a Dora worker.
  2. Then we recursively delete alluxio fs rm -R /a/. This will talk to a worker, and that worker will recursively remove /a/ from the UFS too.
  3. Then we can still see alluxio fs ls /a/b/c from the cache, until that expires. At this stage, /a/ does not exist in UFS. But some of its children may still exist in cache.

Even if when we delete rm -R /a/, we clear all metadata about /a/* on that worker, that purging does NOT happen to all other workers. So if /a/b/c/ hashes to another worker (not the same one where we delete /a/ and all /a/* metadata), that /a/b/c cache may still exist.

Once that cache expires, or if we ls with a refresh option, ls will reflect the real state and complain the file does not exist. This is because if there is no cache, Dora worker will contact the UFS and realize the file does not exist.

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Urgency
Explain why the feature is important

Additional context
Add any other context or screenshots about the feature request here.

@jiacheliu3 jiacheliu3 added the type-feature This issue is a feature request label Jul 6, 2023
alluxio-bot pushed a commit that referenced this issue Jul 6, 2023
### What changes are proposed in this pull request?

The delete/create options are currently not passed to the UFS. By passing them to the UFS correctly, we should be able to achieve recursive create/delete.

However, note that under Dora structure, when we delete `/a/`, we can't also remove all `/a/*` cache from all workers immediately. #17741
			pr-link: #17724
			change-id: cid-fc5550beec4c9425505f624576b7580a9b171996
jiacheliu3 added a commit to jiacheliu3/alluxio that referenced this issue Jul 11, 2023
### What changes are proposed in this pull request?

The delete/create options are currently not passed to the UFS. By passing them to the UFS correctly, we should be able to achieve recursive create/delete.

However, note that under Dora structure, when we delete `/a/`, we can't also remove all `/a/*` cache from all workers immediately. Alluxio#17741
			pr-link: Alluxio#17724
			change-id: cid-fc5550beec4c9425505f624576b7580a9b171996
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-feature This issue is a feature request
Projects
None yet
Development

No branches or pull requests

1 participant