-
Notifications
You must be signed in to change notification settings - Fork 63
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
OverwriteNewerLocalError
when reading same resource in parallel
#283
Comments
@Gilthans It would be helpful to have a minimally reproducible example here so we can dig in. To me, it seems most likely similar to #49, not #128. We can potentially address things like this by not using time as our check (for example, like #12) or turning off cache checks entirely. There may be other workarounds as well (e.g, a flag to never re-download from the cloud, adding sleeps to your code on first download, manually making sure the |
I'm encountering this too in 0.13.0 as part of a HTTP flask web app. |
Thanks for mentioning @bdc34. I think this will continue to be an issue until we implement a parallel-safe caching layer that's independent of the file system (related issues #9, #11, #12, #128). Here are a few mitigation strategies that might be helpful:
Finally, if someone can provide a minimal code-snippet that reproduces this problem consistently there may be additional mitigations that we can build into the |
I forgot to mention this here, but I tried to create a reproducible example with no luck. I might give it another shot later on |
Similar (likely same) report in #492 What we've been looking for there is a reproducible minimal example that we can use for debugging. Some other things to try:
|
This appears to be similar to #128, with two caveats:
The relevant code is:
This line raises the following exception:
This is despite the fact the program does not write to the file or even open it in 'w' mode.
What may be relevant is that the code is part of an HTTP server which receives several requests in parallel, and it often needs to read the same files for different requests.
Since reading the image file may be a lengthy process which probably uses C code extensively, I think it's possible
open
gets called from another thread before thewith
clause is released, which causes the issue.Is this a known issue? Does the explanation make sense, or am I missing something else?
The text was updated successfully, but these errors were encountered: