-
Notifications
You must be signed in to change notification settings - Fork 188
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
The Flock issue #3757
Labels
Comments
This was referenced May 10, 2022
9 tasks
2 tasks
Closing this since the supposed fix is merged |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
While writing or reading nodes from the disk we want to avoid inconsistent states. That is why we lock (or readlock) files before writing/reading them. This is done by filelocks package.
This works fairly well, however there is a critical point:
When unlocking the file again, we want to delete the created lockfile. BUT we only want to do this when there are no more locks on the file. This leads to concurrency issues when two routines try to delete the file at the same time.
The critical part of the code is this: https://github.com/cs3org/reva/blob/edge/pkg/storage/utils/filelocks/filelocks.go#L144
We need to find a proper way to delete the lockfile without affecting other go routines.
This bug leads to an error message like:
It happens especially often on batch actions (restore, delete, upload, ...).
Whenever you see an error message like above it is most likely this issue that is causing it
The text was updated successfully, but these errors were encountered: