Repository navigation
Acquire read lock when getting file or directory info - #16963
Conversation
There was a problem hiding this comment.
I hope this is debug stuff. Or is this for some future performance improvements? ;)
There was a problem hiding this comment.
No. This reduces the risk of race conditions 🙊 😆
There was a problem hiding this comment.
And also reduces server load by giving the cpu some time to catch up
There was a problem hiding this comment.
All in all, we need to add more of such statements.
b00792a to
3243fd4
Compare
There was a problem hiding this comment.
This reminds me that we should add locking info to the webdav interface.
@icewind1991 @PVince81 I guess this is off scope for 8.1 ?
|
@owncloud-bot retest this please |
|
Ok I managed to upload the files using another way. Renaming the folder while the sync client is running still lead to loss of its contents (after 5 test runs). I'll do another run where I merge #16729 into this one to see if it improves it. |
|
Ok sorry, wrong branch... will retest again. |
|
Data loss still occurring (renamed folder empty), with the following in the log: Next up: same test steps with #16729 merged |
|
Hmm, too bad. Even with this PR and #16729 together, the contents of the renamed folder appeared empty again in my test case. This appeared in the log: This seems similar to what I observed in the original issue (a failed DELETE followed by a successful one) #13391 @icewind1991 let me know if you need more details to reproduce this. |
|
I'd say the key is having the rename operation slow enough so that the running sync client can do update checks several times within that time. One of them is likely to cause the data loss. Other cases will cause redownloads. In my env, there chance is 70% of data loss. |
e114a59 to
f000036
Compare
|
@owncloud-bot retest this please |
f000036 to
72eedda
Compare
|
@owncloud-bot retest this please |
|
switched to an approach where when getting the lock fails it uses the old cache data since it looks like there are to many code path relying on being able to get the cache data during the operation |
|
Have you managed to reproduce the issue this time ? |
|
No, what are the steps you're using to reproduce? |
|
Come on, I already mentioned them so many times every time I tell you that it did not fix the issue. Here #13391 (comment) |
|
|
Still does not fix the rename folder + data loss issue #13391 (comment). It looks like somehow the scanner still detected the missing file and tried and delete the entries. |
|
From what I can tell this doesn't fix the issue with your reproduction steps because atm only a read lock is hold around the cache rename, I'll experiment further with it |
Should be fixed now |
|
@owncloud-bot retest this please |
|
Fixes #16998 |
|
@icewind1991 I'm still seeing #16963 (comment), cannot create directory in the root with the sync client. "Locked" |
|
Wait, I mismanipulated the branches. Trying again. |
|
Works now 👍 |
|
PR fixes the failing smashbox tests |
There was a problem hiding this comment.
shouldn't this be covered by Filesystem::normalizePath($absolutePath) nowerdays?
There was a problem hiding this comment.
True. @icewind1991 probably forgot to remove it after rebasing ? (normalizePath wasn't there originally)
d8f23f2 to
6018567
Compare
4c993af to
17be099
Compare
|
A new inspection was created. |
|
I will test all smashbox tests agains this. So far it looks promising |
|
@owncloud-bot retest this please |
sharePermissions fails, so I split it up for details:
Note: move_in_overwrite deletes + creates thats why READ+UPDATE is okay. |
|
So 👍 since it fixes 3 out of the 4 failing tests. |
|
New issue created #17029 |
Acquire read lock when getting file or directory info


Prevents cache data being changed while a file is being written or a folder is being renamed.
For #13391
cc @DeepDiver1975 @PVince81