Repository navigation
[command] delete orphaned file cache entries - #15437
Conversation
|
cc @butonic You also noticed this on some instances |
|
I guess you'll also add #14676 once it's merged ? |
|
Or should this (orphaned file cache entries) be run as a background job too ? I can't think of any real-life situation where such entries would be produced, so it might be fine to have it only as an explicit command. |
|
That's why I created a command ;) There are instances that are somehow broken ... |
There was a problem hiding this comment.
Move the kong fu into the database adapter please
There was a problem hiding this comment.
Not really possible as this is specific to this situation.
Another similar case here: https://github.com/owncloud/core/pull/14676/files#diff-e4aa006eb720e90531b21006170392f9R50
I'm not sure we can make this properly generic.
There was a problem hiding this comment.
well you see the problem? the code you linked does not work on postgres, as per this code + comment here
00d1324 to
e2243e1
Compare
|
from #14676 (comment)
|
e2243e1 to
1c1e040
Compare
There was a problem hiding this comment.
Please change the message to "$deletedEntries orphaned file cache entrie(s) deleted".
Because currently it sounds like it deleted real actual files (and sounds a bit scary too)
|
Tested, works. 👍 |
|
If we delete file cache entries we should also delete shares referencing these entries or create a separate DeleteOrphanedSharesJob. |
|
DeleteOrphanedSharesJob is here #14676 but is run every 15 mins. But we could automatically call it from inside this command instead, if needed. |
* ./occ files:cleanup * delete file cache entries without an existing storage
1c1e040 to
cefdcea
Compare
|
@PVince81 Done :) @butonic @nickvergessen @LukasReschke Ready for review :) |
|
Refer to this link for build results (access rights to CI server needed): |
|
The inspection completed: 1 new issues, 10 updated code elements |
|
@nickvergessen @LukasReschke One review left :) |
|
👍 |
[command] delete orphaned file cache entries

./occ files:cleanupFor manual cleanup, because of a somehow broken database.
cc @icewind1991 @PVince81
I've seen this on multiple instances and this would help to clean up somehow screwed up filecache entries.