-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: remove orphaned entries from filecache_extended #38933
Conversation
4c3a6c7
to
c84aef5
Compare
@@ -48,7 +50,8 @@ public function __construct(IDBConnection $connection) { | |||
protected function configure() { | |||
$this | |||
->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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason to not make this run by default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Switched to running it by default and having the flag disable it in case we ever find cases where that is required
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <mail@danielkesselberg.de>
Signed-off-by: Robin Appelman <robin@icewind.nl> Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
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