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

Fog::Local::File not safe for concurrent use #5

Open
plribeiro3000 opened this issue Aug 2, 2015 · 2 comments
Open

Fog::Local::File not safe for concurrent use #5

plribeiro3000 opened this issue Aug 2, 2015 · 2 comments
Labels

Comments

@plribeiro3000
Copy link
Member

Hi, we've run in to issues using Fog as a local blobstore from multiple concurrent clients. Specifically the .save method creates parent directories (ab/cd/abcd-efgh-ijkl) only if they don't exist before the file is saved. This is fine, but if another file with the same first four characters in its key is being deleted at the same time those directories can get deleted before the actual save happens. When this occurs we get an ENOENT - No such file or directory error (and it does seem to occur reasonably frequently under real load).

I'm not sure whether Local::File is supposed to be thread-safe or to work for concurrent access from more than one process, or whether we should expect to have to work around these issues at a higher level. Please let us know if you think you would accept a PR to fix the code here to be resilient to concurrent deletes and saves. Thanks!

Original issue made by @julz at fog/fog#3137

@plribeiro3000
Copy link
Member Author

cc/ @julz @geemus

@github-actions
Copy link

This issue has been marked inactive and will be closed if no further activity occurs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants