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
downloader: when retry but can't resume, retry the whole file #3457
Conversation
f8a1cc2
to
7827af1
Compare
I'm not sure this is correct. If we've already written to a sink, then we can't do a retry because we would end up writing the same data twice. Otherwise we get errors like "error 9 while decompressing xz file". (See 53247d6.) |
Seems like CI fails due to e322a16 |
@edolstra is there any way to reset the sink? |
No. But if ranged requests are unavailable, we could discard the first |
Couldn't |
That was what 78fa47a tried to do but it was a lot more complicated. |
Actually, we should prevent from connecting the sink until we assert response status code is 2xx |
@domenkozar But the status code already is 2xx. The problem is that the transmission of the body gets interrupted. |
I'm not so sure, #3278 is 504 and I've seen reports with |
Hm, it's possible |
Going to continue in #3278 |
I'm not sure I fully understand how code works, but I assume
init
is called for each retry and this is the correct way to sync upwarn
and the actual behavior of resuming.Fixes #3278
I'd appreciate a maintenance release since a lot of users of Cachix are hitting this occasionally.