feat: remove orphaned entries from filecache_extended#38933
feat: remove orphaned entries from filecache_extended#38933icewind1991 merged 2 commits intomasterfrom
Conversation
4c3a6c7 to
c84aef5
Compare
| ->setName('files:cleanup') | ||
| ->setDescription('cleanup filecache'); | ||
| ->setDescription('cleanup filecache') | ||
| ->addOption('filecache-extended', null, InputOption::VALUE_NONE, 'remove orphaned entries from filecache_extended'); |
There was a problem hiding this comment.
Any reason to not make this run by default?
There was a problem hiding this comment.
Technically, no. The execution for the left join seems quick, but I only tested with ~1000 files.
My motivation, to hide it behind a flag, is my incomplete knowledge about filecache and especially external storages. However, I can't think of a case, why we would have a record in filecache_extended without a matching one in filecache.
We can run it by default if you think it should ;)
There was a problem hiding this comment.
Switched to running it by default and having the flag disable it in case we ever find cases where that is required
juliusknorr
left a comment
There was a problem hiding this comment.
Code looks good, small question inside :)
|
Moving to 29 |
c84aef5 to
da57476
Compare
da57476 to
9fb2258
Compare
|
Howdy 👋 Thank you for taking care, I almost forgot about it 🙈 I don't remember if I tested it with OCI back then. |
9fb2258 to
3b73c89
Compare
|
63353ba to
0635c24
Compare
|
Moving to 30 |
0635c24 to
3e0299f
Compare
Signed-off-by: Daniel Kesselberg <[email protected]>
Signed-off-by: Robin Appelman <[email protected]> Signed-off-by: Daniel Kesselberg <[email protected]>
3e0299f to
1d34f0a
Compare
Summary
Test scenario:
select * from oc_filecache_extended left join oc_filecache on oc_filecache_extended.fileid = oc_filecache.fileid where oc_filecache.fileid is null;select * from oc_filecache_extended left join oc_filecache on oc_filecache_extended.fileid = oc_filecache.fileid where oc_filecache.fileid is null;server/lib/private/Files/Cache/Storage.php
Line 222 in e69c7c4
Best would be to clear filecache_extended when deleting the storage.
TODO
Checklist