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
In some situations like #22824, one might need to manually operate on the filecache to restore broken entries.
The trouble with this is that when reparenting entries, one would need to update both the "parent" value and "path_hash", which can be tedious.
Also, there might be instances where bugs caused holes in the file cache or inconsistencies.
I suggest we add a OCC repair command to repair these:
repair "path_hash" column, if different
repair "parent" column, if it doesn't match
Could be part of the health check: #18922
Could also be made an extra --repair option for occ files:scan, if the logic is close enough to be suitable. (I suppose one could call this some kind of "scandisk" 😉)
Activity
MorrisJobke commentedon Mar 4, 2016
I already have SQL statements here - but they are kind of expensive and needs some re-evaluation.
PVince81 commentedon Oct 12, 2016
Here are some Mysql specific ones I made quickly:
select * from oc_filecache where path_hash != md5(path);=> must return 0 resultsselect fc.fileid, fc.path, fc2.fileid, fc2.path from oc_filecache fc, oc_filecache fc2 where fc.parent = fc2.fileid and CONCAT(fc2.path, '/', fc.name) != fc.path and fc2.path != '';=> must return 0 resultsPVince81 commentedon Feb 23, 2017
select * from oc_filecache f where f.parent > 0 and not exists (select fileid from oc_filecache f2 where f.parent=f2.fileid);PVince81 commentedon Jun 26, 2017
for cases where parent-child don't match path, fix the path: #28217