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
fallback to refreshing narinfo when nar is missing #3969
Conversation
52b37da
to
38f6b1e
Compare
Wouldn't this still fail in |
The use case here is that there's a GC on the binary cache meanwhile. So there won't be nar nor narinfo, while Nix will have cached narinfo. That's why we fallback to deleting the cache entry on 404 and retry. The case where nar is corrupted is already being handled and if it's not corrupted it should just work? |
@edolstra does that clear up the motivation? |
The motivation is clear. I was asking about how this works. How is it that |
That's when we refresh the narinfo and retry fetching the new nar (the optimization could be to check if nar url differs and not re-fetch it) |
Note that this would allow deleting nar files that are younger than 30 days, currently that results into Nix not recovering without deleting binary cache sqlite file. |
@edolstra I'm stuck here as I don't understand your questions. |
I marked this as stale due to inactivity. → More info |
I closed this issue due to inactivity. → More info |
Not sure this is the best way, but it does work :-D
Fixes #1885