Skip to content

Conversation

@mejo-
Copy link
Member

@mejo- mejo- commented Oct 15, 2021

On external storages, removing files sometimes tries to remove partial
data, represented in an array.

lib/private/Files/Cache/Cache.php:remove() doesn't support to process
arrays.

According to @icewind1991, we can ignore this partial data in
remove().

Fixes: #26544

@mejo- mejo- requested a review from icewind1991 October 15, 2021 14:25
On external storages, removing files sometimes tries to remove partial
data, represented in an array.

`lib/private/Files/Cache/Cache.php:remove()` doesn't support to process
arrays.

According to @icewind1991, we can ignore this partial data in
`remove()`.

Fixes: #26544
Signed-off-by: Jonas Meurer <[email protected]>
@mejo- mejo- force-pushed the fix/files_cache_remove_partial branch from f4543c8 to 0402f95 Compare October 15, 2021 14:26
@mejo-
Copy link
Member Author

mejo- commented Oct 15, 2021

@icewind1991: we discussed this issue in the NC Talk community chat some weeks ago. I don't exactly remember your arguments, but you said that partial data (represented as array) can be ignored when removing in lib/private/Files/Cache/Cache.php:remove().

You also mentioned that you'd like to get rid of the whole concept of partial data one day but would suggest to just add an exception for now.

I tried to do that by simply ignoring $entry when it's an array. At least it fixes #26544 for me on the instances where I was able to reproduce it. But let me be honest: I don't fully understand the implications yet. I don't even understand where this partial data comes from.

Would be great if you could take a look and comment :)

@mejo-
Copy link
Member Author

mejo- commented Nov 9, 2021

@icewind1991 did you have time to take a quick look? I can imagine that this is the wrong approach, but that's what I remembered from our discussion on the issue a few weeks back.

Also Cc @azul

@solracsf
Copy link
Member

solracsf commented Jan 5, 2022

See also #26544 (comment)

@mejo-
Copy link
Member Author

mejo- commented Jan 12, 2022

After a debugging session with @icewind1991, this is the wrong approach. #30631 is a better attempt to fix this.

@mejo- mejo- closed this Jan 12, 2022
@skjnldsv skjnldsv deleted the fix/files_cache_remove_partial branch March 14, 2024 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Call to a member function getId() on array at lib/private/Files/Cache/Updater.php on line 160

3 participants