Repository navigation
Disable part files for OC ext storage backend + s2s backend - #13160
Conversation
When uploading files to an OC ext storage backend or when using server to server sharing storage, part files aren't needed because the backend already has its own part files and takes care of the final atomic rename operation. This also fixes issues when using two encrypted ownCloud instances where one mounts the other either as external storage (ownCloud backend) or through server to server sharing.
There was a problem hiding this comment.
Is $internalPath actually needed here for anything except eating memory? - I doubt it, remove it?
|
The inspection completed: 3 new issues, 1 updated code elements |
|
Refer to this link for build results (access rights to CI server needed): |
There was a problem hiding this comment.
Enforce type?
private function needsPartFile(\OCP\Files\Storage $storage) {There was a problem hiding this comment.
I considered it, but was a bit afraid what happens if by any chance there's a storage that doesn't implement this interface. Not sure why I thought that. Just wanted to be safe and not risk breaking additional stuff.
There was a problem hiding this comment.
Mhm – generally speaking a type annotation in the PHPDoc is worth nothing when not enforced as well :-)
But go whatever you feel safer here :-)
|
Anything else to change ? |
|
looks good from my pov 👍 |
|
Yes. We set it to 8.1 back then because the scope of the fix wasn't clear. |
|
@MorrisJobke @LukasReschke @icewind1991 can we merge this ? |
|
I will review this one. |
|
Tested with small (text file) and big 700 MB video. Both work after the fix (via web UI and sync client) |
|
👍 |
Disable part files for OC ext storage backend + s2s backend
When uploading files to an OC ext storage backend or when using server
to server sharing storage, part files aren't needed because the backend
already has its own part files and takes care of the final atomic rename
operation.
This also fixes issues when using two encrypted ownCloud instances where
one mounts the other either as external storage (ownCloud backend) or
through server to server sharing.
Note: this is a quick fix for now. In the future we'll look into providing a method on the Storage class and/or having storage specific storage attributes/chunk handlers that would let the storage class decide whether or not part files/chunks/whatever is required or not.
Please review @schiesbn @icewind1991 @DeepDiver1975
Fixes #13157 and #5952
To test: setup two ownCloud instances with BOTH having encryption enabled.
Server to server sharing
Mount OC B in OC A.
Setup sync client for OC A.
External storage backend "ownCloud"
Mount OC B in OC A.
Setup sync client for OC A.
Regression testing
Uploading to regular storage or another one (ex: SFTP):
I tested this and it worked.