-
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
update the file cache within the write lock #17017
Conversation
@@ -124,13 +124,17 @@ public function getData($path) { | |||
* @param int $reuseExisting | |||
* @param int $parentId | |||
* @param array | null $cacheData existing data in the cache for the file to be scanned | |||
* @param bool $lock |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
false to disable cache locking
?
Ran the rename test case 10 times with this PR merged together with #16963 and the data loss seems to have disappeared! @icewind1991 you rock 😄 How about just merging into this PR here to make it easier for regression testing ? I think we cannot merge this yet because there is still this regression #16963 (comment) (but I'm ok if we do merge and fix it separately) |
A new inspection was created. |
👍 (please fix the comments) |
Already done 😄 |
@DeepDiver1975 @MorrisJobke please review |
Tested both PRs merged, fixes #11795 too |
Tested both PRs merged, fixes #16584 too |
👍 tested together with #16963 (comment) |
update the file cache within the write lock
Prevents any other process from updating the cache while we're working on it.
Fixes #13391
With just this PR trying to list the folder being renamed will result in a locked exception being thrown and the sync client will try again later, together with #16963 you can still browser the folder being renamed (actually trying to download the file will result in a locked error) and the sync client wont detect any changes until the rename is done.
cc @PVince81 @DeepDiver1975