Skip to content

fix(trashbin): keep cache and db consistent#57360

Open
hweihwang wants to merge 8 commits intomasterfrom
fix/trashbin-atomic-cache
Open

fix(trashbin): keep cache and db consistent#57360
hweihwang wants to merge 8 commits intomasterfrom
fix/trashbin-atomic-cache

Conversation

@hweihwang
Copy link
Copy Markdown
Contributor

@hweihwang hweihwang commented Jan 6, 2026

Summary

  • insert files_trash row before payload move and remove it (and payload/cache) on move failure
  • update trash cache for uncached sources using size delta to avoid full folder scan
  • delete files_trash row after payload delete
  • add regression test for uncached delete

Testing

  • not run (phpunit bootstrap requires installed instance)

Fixes #56493

@hweihwang hweihwang requested a review from a team as a code owner January 6, 2026 10:33
@hweihwang hweihwang requested review from Altahrim, leftybournes, salmart-dev and yemkareems and removed request for a team January 6, 2026 10:33
@hweihwang hweihwang marked this pull request as draft January 6, 2026 10:34
@hweihwang hweihwang marked this pull request as ready for review January 6, 2026 11:08
@hweihwang hweihwang marked this pull request as draft January 6, 2026 11:47
hweihwang and others added 4 commits April 1, 2026 18:00
Signed-off-by: Hoang Pham <hoangmaths96@gmail.com>
Signed-off-by: Hoang Pham <hoangmaths96@gmail.com>
Signed-off-by: Hoang Pham <hoangmaths96@gmail.com>
Signed-off-by: Robin Appelman <robin@icewind.nl>
@icewind1991 icewind1991 force-pushed the fix/trashbin-atomic-cache branch from b5f9df8 to 0cad873 Compare April 1, 2026 17:17
@icewind1991
Copy link
Copy Markdown
Member

  • Added some more tests
  • Performed some cleanup

Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Robin Appelman <robin@icewind.nl>
@icewind1991 icewind1991 force-pushed the fix/trashbin-atomic-cache branch from 0cad873 to 966db54 Compare April 1, 2026 17:25
Signed-off-by: Robin Appelman <robin@icewind.nl>
@icewind1991 icewind1991 marked this pull request as ready for review April 1, 2026 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Trashbin copy leaves blob in /files_trashbin without oc_files_trash / filecache rows when request aborts after moveFromStorage

2 participants