Merge pull request #43982 from nextcloud/fixMemExaust

fix(filecache): Move from array_merge to avoid memory exhaustion on large scans
pull/43613/head
John Molakvoæ 3 months ago committed by GitHub
commit 7dd22b0c83
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -585,8 +585,13 @@ class Cache implements ICache {
return $cacheEntry->getPath();
}, $children);
$deletedIds = array_merge($deletedIds, $childIds);
$deletedPaths = array_merge($deletedPaths, $childPaths);
foreach ($childIds as $childId) {
$deletedIds[] = $childId;
}
foreach ($childPaths as $childPath) {
$deletedPaths[] = $childPath;
}
$query = $this->getQueryBuilder();
$query->delete('filecache_extended')

Loading…
Cancel
Save