You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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!
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 anENOENT - 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
The text was updated successfully, but these errors were encountered: