Describe the bug
When the same nar is to be uploaded multiple times (I think via dependencies), the concurrent writes/renames will conflict and failures may occur.
Steps To Reproduce
Still working on this. I did add a bunch of logging and observed the concurrency of multiple atomicWrite calls.
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Expected behavior
Everything is written without errors, redundant nar upserts either do nothing or replace the existing nar.
nix-env --version output
Master branch
Additional context
atomicWrite in src/libstore/local-binary-cache-store.cc uses process ids for temporary files, but I think it needs to use something finer-grained to distinguish threads.
Describe the bug
When the same nar is to be uploaded multiple times (I think via dependencies), the concurrent writes/renames will conflict and failures may occur.
Steps To Reproduce
Still working on this. I did add a bunch of logging and observed the concurrency of multiple
atomicWritecalls.Expected behavior
Everything is written without errors, redundant nar upserts either do nothing or replace the existing nar.
nix-env --versionoutputMaster branch
Additional context
atomicWriteinsrc/libstore/local-binary-cache-store.ccuses process ids for temporary files, but I think it needs to use something finer-grained to distinguish threads.