-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues to solve with locking #16664
Comments
@icewind1991 see above |
I suggest to focus on the scanner first so we can get the most critical issue solved at last. |
|
Not really something we can fix without having the client manually acquire a lock on the folder it's uploading to, it's not an issue with concurrent requests |
@icewind1991 I still think it should be possible to recover from this situation without having missing files, even if one half is in one folder and the other half in the other one. Goal is to avoid having a situation where files are completely lost. Either the rename operation needs to stop/fail or the sync client will give up once one of the uploads doesn't reach its target. |
It's not The problem has nothing to do with concurrent requests, it's caused because uploading a folder from the sync client takes multiple requests, there is no way to make that atomic without manually managing a lock for it. A different way to fix it unrelated to locking would be to have the sync client specify the fileid of the target folder, that way the server can either return a proper error (folder renamed to ...., try again with that path) or get the target folder from that id |
The upload doesn't have to be atomic. The sync client would upload 5 files of 10, then get the locked error because someone started renaming the folder (the folder rename must be atomic), and it would give up until the folder is freed again. So in the end the first folder would have 5 files, and then the sync client would recreate the original folder name (once unlocked) to reupload all files. |
thank you @PVince81 |
Assigning to self to verify the failed cases I found before. I expect the following to still have issues: sharing (share and unshare currently do not set locks) and also versions (version operations aren't transactional yet). Hopefully these should not be critical. |
Moving to 8.1.1. Remaining issues are related to versions that is lacking locking. |
All outstanding issues have been raised as separate tickets, closing this one. |
sleep(10);
here: https://github.com/owncloud/core/blob/master/lib/private/files/cache/cache.php#L551We need to tweak the locking to be able to avoid such situations.
To clarify: download should be forbidden in the source folder, but not in the target folder.
Tests:
Sharing (locks must work across users):
Versions:
Previews:
(achieved by overwriting a pic file that has no preview yet, and sleep in streamCopy)
Encryption:
Zip download:
s2s and locking
The text was updated successfully, but these errors were encountered: