Skip to content

fix a few uploading race conditions

David Vorick requested to merge upload-race into master

There is still a race condition remaining when we save file pieces, because there we actually copy the whole file when passing it to save, and this happens even mid-upload.

The solution is either to add a lock to the uploading updater, or to exclude in-progress uploads from being saved. I'm in favor of the latter given our current design (uploads can't be resumed anyway), but neither can be easily implemented.

I'm just going to leave it for now, since the renter is going to be getting a pretty big facelift anyway.

Merge request reports