You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add repair step to delete file cache when storage entry is gone #7874
Just noticed that the sharing app has something to clear broken shares (#7293), so that part might not be needed, or could be moved into a repair class instead. The goal being to be able to do this repair any time.
So this is a maintenance script? Or CRON?
My understanding was that some events triggered the scanfiles() on an account, one being it sensing it was out of sync. Trying to figure out how this is different...
@MTRichards I should have called it "repair step".
This would be a repair step that runs during upgrade, or whenever the admin runs ./occ maintenance:repair.
The other command, ./occ files:scan will repair individual entries as long as there is an entry in oc_storages.
Here the goal is to remove ALL entries in oc_filecache for which there is no more entry in oc_storages.
I don't think files:scan can fix that. Can you confirm @icewind1991 ?
changed the title [-]Add repair script for orphaned file cache entries[/-][+]Add repair step to delete file cache when storage entry is gone[/+]on Sep 8, 2014
This situation can happen on setups where the admin manually deletes storage entries, for example when trying to recover from the legacy home storage issue, basically deleting the entries in oc_storages for legacy home storages but possibly forgetting to remove the matching oc_filecache and oc_share entries.
Hmm maybe if we consider that the upgrade time is the best time to do a bit of cleanup.
I don't think so, because this step could take very long and simply would longer the maintenance for no actual reason. This cleanup can be done while running the instance in normal mode with no impact (except the load impact on the database for doing the query)
Activity
PVince81 commentedon Mar 25, 2014
Also remove the matching share entries. That would prevent "ghost" share entries to appear on other user's file system.
PVince81 commentedon Mar 25, 2014
Just noticed that the sharing app has something to clear broken shares (#7293), so that part might not be needed, or could be moved into a repair class instead. The goal being to be able to do this repair any time.
PVince81 commentedon Sep 5, 2014
@MTRichards @craigpg setting to OC 7 backlog
MTRichards commentedon Sep 5, 2014
So this is a maintenance script? Or CRON?
My understanding was that some events triggered the scanfiles() on an account, one being it sensing it was out of sync. Trying to figure out how this is different...
PVince81 commentedon Sep 8, 2014
@MTRichards I should have called it "repair step".
This would be a repair step that runs during upgrade, or whenever the admin runs
./occ maintenance:repair.The other command,
./occ files:scanwill repair individual entries as long as there is an entry inoc_storages.Here the goal is to remove ALL entries in
oc_filecachefor which there is no more entry inoc_storages.I don't think
files:scancan fix that. Can you confirm @icewind1991 ?[-]Add repair script for orphaned file cache entries[/-][+]Add repair step to delete file cache when storage entry is gone[/+]PVince81 commentedon Sep 8, 2014
This situation can happen on setups where the admin manually deletes storage entries, for example when trying to recover from the legacy home storage issue, basically deleting the entries in
oc_storagesfor legacy home storages but possibly forgetting to remove the matchingoc_filecacheandoc_shareentries.MTRichards commentedon Sep 8, 2014
Ok, understood. Seems like a good step, but not critical path for immediate release. Got it.
icewind1991 commentedon Sep 8, 2014
Yes, the scanner doesn't touch any entries from storages that aren't mounted or no longer exist
PVince81 commentedon Jan 14, 2015
@DeepDiver1975 setting to 8.1, it's about time we implemented this.
Please set to backlog if not acceptable.
MorrisJobke commentedon Apr 9, 2015
It is now a command: #15437
@PVince81 Should we move this to a repair step?
PVince81 commentedon Apr 10, 2015
Hmm maybe if we consider that the upgrade time is the best time to do a bit of cleanup.
MorrisJobke commentedon Apr 10, 2015
I don't think so, because this step could take very long and simply would longer the maintenance for no actual reason. This cleanup can be done while running the instance in normal mode with no impact (except the load impact on the database for doing the query)
MorrisJobke commentedon Apr 10, 2015
I would leave this as it is now.