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

Draft: Add locking #53

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Draft: Add locking #53

wants to merge 2 commits into from

Conversation

alex-rg
Copy link

@alex-rg alex-rg commented Oct 10, 2024

This might be useful to prevent data loss/corruption when we have simultaneous transfers of the same file.

We do the locking in the following way: lock is added to a separate object with the name <file_name>.<lock_name>, where <lock_name> is different from file's object numbers (it is basically a text string). On lock release, this object is removed. We use this ugly technique instead of locking the first object for the following reason: radosstriper does not like when it tries to create a new file and its first object already exists.

root added 2 commits October 9, 2024 13:53
This might be useful to prevent data loss/corruption when we have
simultaneous transfers of the same file.

We do the locking in the following way: locks are added on a separate
object with the name <file_name>.<lock_name>, where <lock_name> is
different from file's object numbers (it is basically a text string).
On lock release, this object is removed. We use this awkward tecnique
instead of locking the first object for the following reason:
radosstriper does not like when he tries to create a new file, and
its first object already exists.
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.

1 participant