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
Commit fbda405
Browse filesBrowse the repository at this point in the historyBrowse files
fix(files): clean up filecache companion rows of removed storages
cleanByMountId() deleted the filecache rows of an unmounted storage but
left their filecache_extended and file metadata rows behind. It now goes
through Storage::removeFileCacheEntries(), the same path clear() uses.
files:cleanup also removes filecache_extended, files_metadata and
files_metadata_index rows whose file is no longer in the filecache, so
rows orphaned before this fix are cleaned up too.
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
Copy file name to clipboardExpand all lines: apps/files/lib/Command/DeleteOrphanedFiles.php
+39-50Lines changed: 39 additions & 50 deletions
Original file line number
Diff line number
Diff line change
@@ -18,12 +18,13 @@
18
18
useOCP\IDBConnection;
19
19
20
20
/**
21
-
* Delete all file entries that have no matching entries in the storage table.
21
+
* Delete all file entries that have no matching entries in the storage table,
22
+
* and the rows keyed by file id that have no matching file entry.
22
23
*/
23
24
#[AsCommand(
24
25
name: 'files:cleanup',
25
26
description: 'Clean up orphaned filecache and mount entries',
26
-
help: 'Deletes orphaned filecache and mount entries (those without an existing storage).',
27
+
help: 'Deletes orphaned filecache and mount entries (those without an existing storage), and filecache_extended and file metadata entries without a filecache entry.',
27
28
)]
28
29
class DeleteOrphanedFiles {
29
30
publicconstintCHUNK_SIZE = 200;
@@ -38,23 +39,22 @@ public function __invoke(
38
39
#[Option(name: 'skip-filecache-extended', description: 'don\'t remove orphaned entries from filecache_extended')]
0 commit comments