You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Un-optimized and buggy deletion of metadata #54274
When deleting a folder definitively from the trash, with multiple entries, for each entry I get the following DB query:
The first two queries are created by: OC\FilesMetadata\Listener\MetadataDelete::handle
The last one by: OCA\Files\Listener\SyncLivePhotosListener->handle
Both triggered by the same: CacheEntryRemovedEvent
There is at least 2 issues with that:
It's inefficient because the number of query scale linearly with the number of entries in deleted folder
We delete the entry in the metadata table and then fetch it to find the corresponding live photo. The fetching is always empty so if there was a live photo, it won't be deleted.
Activity
fix(trash): Fix order of metadata deletion
fix(trash): Fix order of metadata deletion
CarlSchwan commentedon Aug 6, 2025
I now have two MRs:
fix(trash): Fix order of metadata deletion
fix(trash): Fix order of metadata deletion
fix(trash): Fix order of metadata deletion
fix(trash): Fix order of metadata deletion
fix(trash): Fix order of metadata deletion