Skip to content

[stable35] fix(filecache): announce every removed entry so metadata is cleaned up - #64498

Merged
artonge merged 3 commits into
stable35from
backport/63998/stable35
Sep 18, 2026
Merged

artonge merged 3 commits into
stable35from
backport/63998/stable35

Conversation

@backportbot

@backportbot backportbot Bot commented Sep 17, 2026

Copy link
Copy Markdown

Backport of PR #63998

Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
clear() no longer dispatches removal events for every entry of the
storage. With admin_audit enabled that wrote one log line per file of a
deleted user. It now removes the filecache_extended and file metadata
rows batch by batch, before deleting the filecache rows themselves.

Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
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>
@backportbot
backportbot Bot requested a review from a team as a code owner September 17, 2026 19:09
@backportbot
backportbot Bot requested review from Altahrim, CarlSchwan, artonge, icewind1991, leftybournes, salmart-dev and solracsf and removed request for a team September 17, 2026 19:09
@backportbot backportbot Bot added bug 3. to review Waiting for reviews labels Sep 17, 2026
@backportbot backportbot Bot added this to the Nextcloud 35.0.1 milestone Sep 17, 2026
@artonge
artonge merged commit 0e1e724 into stable35 Sep 18, 2026
203 of 208 checks passed
@artonge
artonge deleted the backport/63998/stable35 branch September 18, 2026 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants