only allow a single concurrent dav write to a file#9355
Conversation
Signed-off-by: Robin Appelman <robin@icewind.nl>
Codecov Report
@@ Coverage Diff @@
## master #9355 +/- ##
============================================
+ Coverage 51.93% 51.93% +<.01%
Complexity 25394 25394
============================================
Files 1608 1608
Lines 95444 95448 +4
Branches 1393 1393
============================================
+ Hits 49565 49569 +4
Misses 45879 45879
|
|
@icewind1991 Could you explain a bit more the use case and scenario here? |
|
Something was causing a sync client to have send multiple requests to do chunk assembly for a 100gb file at the same time. With this we can be sure that only one assembly can run at the same time |
|
So you just lock some specific file (which doesn't exist at that point) right? Just to prevent multiple trying to do it at the same time right? |
|
Yes, locking a dummy file allows blocking concurrent access while still allowing read access to the file while writing the part file |
|
@icewind1991 @rullzer Should we backport this to stable13? |
|
Probably! |
While concurrent writes wont lead to file corruption it's a waste of bandwith and multiple chunked upload assemblies can lead to the server running out of space