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

Make Cache::removeChildren non recursive #20724

Merged
merged 2 commits into from
Aug 20, 2020

Conversation

icewind1991
Copy link
Member

Currently the "add new files during scanning" call stack is smaller than
the "remove deleted files during scanning" call stack. This can lead to
the scanner adding folders in the folder tree that are to deep to be
removed.

This changes the removeChildren logic to be non recursive so there is
no limit to the depth of the folder tree during removal

Signed-off-by: Robin Appelman robin@icewind.nl

@icewind1991 icewind1991 added the 3. to review Waiting for reviews label Apr 29, 2020
@icewind1991 icewind1991 added this to the Nextcloud 20 milestone Apr 29, 2020
Copy link
Member

@ChristophWurst ChristophWurst left a comment

Choose a reason for hiding this comment

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

🐘

@icewind1991 icewind1991 force-pushed the remove-children-non-recursive branch from a256c52 to d129bb0 Compare July 10, 2020 12:05
@MorrisJobke MorrisJobke mentioned this pull request Aug 11, 2020
57 tasks
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 looks good 👍

Currently the "add new files during scanning" call stack is smaller than
the "remove deleted files during scanning" call stack. This can lead to
the scanner adding folders in the folder tree that are to deep to be
removed.

This changes the `removeChildren` logic to be non recursive so there is
no limit to the depth of the folder tree during removal

Signed-off-by: Robin Appelman <robin@icewind.nl>
@MorrisJobke MorrisJobke force-pushed the remove-children-non-recursive branch from d129bb0 to 5af7d92 Compare August 20, 2020 13:37
@MorrisJobke
Copy link
Member

Rebased to get newer CI output and then this is ready for merge.

@MorrisJobke MorrisJobke added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Aug 20, 2020
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
@MorrisJobke
Copy link
Member

CI succeeded in the old commit. I just added one to accept the warning of Psalm for now. Because changing the reviewed code would introduce a new risk here.

@MorrisJobke
Copy link
Member

Psalm happy now -> merge

@MorrisJobke MorrisJobke merged commit 67ecdc9 into master Aug 20, 2020
@MorrisJobke MorrisJobke deleted the remove-children-non-recursive branch August 20, 2020 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants