Skip to content
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

Fix persistent hash mismatch errors when importing #832

Merged
merged 1 commit into from Mar 2, 2021

Conversation

wizeman
Copy link
Member

@wizeman wizeman commented Nov 10, 2020

This would start happening if the network connection between the Hydra
server and the remote build server breaks after sucessfully importing
at least one output of a derivation, but before having finished
importing all outputs.

Fixes #816.

This would start happening if the network connection between the Hydra
server and the remote build server breaks after sucessfully importing
at least one output of a derivation, but before having finished
importing all outputs.

Fixes NixOS#816.
@wizeman
Copy link
Member Author

wizeman commented Nov 10, 2020

cc @edolstra

@ajs124
Copy link
Member

ajs124 commented Feb 25, 2021

@grahamc As discussed in IRC, we've been running this since the end of November, but I don't remember if we were observing this or why I added it, although I guess I had a reason (thanks past me for writing a useless commit message).

@grahamc
Copy link
Member

grahamc commented Feb 25, 2021

19:58 <gchristensen> ajs124: coming back to that PR a few minutes later I think I get it
19:59 <gchristensen> addToStore won't read from source2 if it has the path already, meaning it'd say "Send me path X" remote would say "Here's path X"... but the receiver wouldn't read it, then on the next output it'd say "please send me path Y" and now it is reading path X's data

https://github.com/NixOS/nix/blob/c189031e8be0530d73a817571ad7f81ad5eedce6/src/libstore/local-store.cc#L1117 confirms this.

@grahamc
Copy link
Member

grahamc commented Mar 2, 2021

👍 confirmed this fixes the issue, thank you! Note: I tried to write an automatic test for this using multiple stores, but no luck :/

@grahamc grahamc merged commit 68ac64d into NixOS:master Mar 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build failures due to 'hash mismatch importing path' in hydra-queue-runner
3 participants