-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
cache: Recheck before downloading #2019
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2019 +/- ##
==========================================
- Coverage 50.16% 50.05% -0.11%
==========================================
Files 169 169
Lines 13573 13574 +1
==========================================
- Hits 6809 6795 -14
- Misses 5740 5760 +20
+ Partials 1024 1019 -5
Continue to review full report at Codecov.
|
Are you sure the "other" goroutine successfully downloaded the file? From what I can tell the problem can be explained by a failure on the other goroutine. Here is execution schedule returns success when download failed:
Or do I misunderstand how the caching works here? |
Never mind. Failed download is another problem. |
Here's a bit more log:
The third column is the goroutine number. What I reconstructed was:
So, now we're checking if the file has been cached in Thank you for asking btw, I saw a small bug and will push an new commit: in |
What is the purpose of this change? What does it change?
recheck if another goroutine has already downloaded to the cache before
attempting it. A user reported that restic printed errors like this:
This means that a goroutine was attempting to download a file, but by
the time it got to the actual download, the file was already there. We
now recheck if the file has been downloaded in the meantime.