Skip to content
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

Do clearstatcache() on rmdir #21677

Merged
merged 2 commits into from
Aug 5, 2020

Conversation

J0WI
Copy link
Contributor

@J0WI J0WI commented Jul 3, 2020

I'm trying to fix a bunch of errors that look like:

rmdir(): No such file or directory at /var/www/html/lib/private/Files/Storage/Local.php#114
unlink(): No such file or directory at /var/www/html/lib/private/Files/Storage/Local.php#116

J0WI added 2 commits July 3, 2020 22:42
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
@J0WI J0WI added the 3. to review Waiting for reviews label Jul 3, 2020
@rullzer rullzer requested a review from icewind1991 July 5, 2020 08:03
@rullzer rullzer added this to the Nextcloud 20 milestone Jul 5, 2020
Copy link
Member

@MorrisJobke MorrisJobke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code makes sense 👍

Copy link
Contributor

@kesselb kesselb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you able to provide a test case and describe your setup? A search for rmdir(): No such file or directory at shows only 3 open issues. I recall that stat and getMetaData called quite often during. Adding clearstatcache seems like a bad idea to me (but I have not done any profiling yet).

@J0WI
Copy link
Contributor Author

J0WI commented Jul 8, 2020

I haven found a way to reproduce it. I guess it's kind of a race condition of parallel operations when huge folders are deleted.

@J0WI
Copy link
Contributor Author

J0WI commented Jul 27, 2020

I recall that stat and getMetaData called quite often during. Adding clearstatcache seems like a bad idea to me (but I have not done any profiling yet).

clearstatcache() can be scoped to a specific path. This patch should actually enhance performance for getMetaData() and stat(). Only rmdir() had no clearstatcache() before.

@MorrisJobke MorrisJobke merged commit ae9ecd5 into nextcloud:master Aug 5, 2020
@J0WI J0WI deleted the clearstatcache-on-rmdir branch August 6, 2020 19:54
@J0WI
Copy link
Contributor Author

J0WI commented Aug 12, 2020

/backport to stable19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants