Repository navigation
Lock file during download - #17009
Conversation
This will throw a LockedException if a concurrent request is currently touching that file.
|
This for the download error message part for here #16701 Another alternative would be to just try and lock the file before the upload, and then directly unlock before the transfer starts, or after the first packet. (hacky) |
|
Looks like max execution time is set to 0 here https://github.com/owncloud/core/blob/master/lib/private/files.php#L151 but it's only for zip files, not regular downloads. |
well - this is what we want to have - right? Don't touch the file while I'm downloading it or I'll get crap.
This is why we need a TTL on locks - as discussed right from the beginning |
we might want to change this and have execution time of 0 for any kind of download. |
There was a problem hiding this comment.
brrr - this file has to die 💀
There was a problem hiding this comment.
We still need it for zip download... unless we can come up with a WebDAV endpoint for zip download.
Also see #16960 (comment), very hard to decide whether to move forward
There was a problem hiding this comment.
We still need it for zip download... unless we can come up with a WebDAV endpoint for zip download.
we have to do this anyhow from my pov
|
TTL discussion here: #16966 |
|
Shouldn't the fopen already handle the locking here? |
|
Yes, it does. But then it's too late and we already sent the 200 OK + headers. We need to be able to return another HTTP code before fopen (readfile) happens. |
|
Should we simply disable xsendfile as soon as locking is enabled? |
or drop this feature completely? |
especially thinking about all our wrapper setups I really question if there is a single valid scenario for xsendfile left. |
|
lets disable it for now if filelocking is active and discuss again for 8.2 |
agreed - I'll add this to this pr ... |
|
A new inspection was created. |
|
@owncloud-bot retest this please |
|
|
Jenkins fails on oracle - can be ignored 👍 |
|
@th3fallen @icewind1991 please review - thx |
|
👍 looks good |
Lock file during download


Put a shared lock on a file before download it, and free it at the end of the transfer.
My worries here:
@DeepDiver1975 @icewind1991 what do you think ?
A similar approach will be needed for zip files, see #16960 (comment)