Repository navigation
Description
Review all repair steps and add a version check or a DB flag for those that do not need to run again.
This could help speed up upgrade time by disabling unneeded repair steps.
One example: "Repair\AvatarPermisisons". I believe that there was an older version where the permissions on disk could be messed up. Once fixed it shouldn't try and re-fix it for every update.
Unfortunately this one does some queries on filecache so it might slow down the update a bit.
Note that we do not want to completely delete repair steps because some will be needed when doing cross-major-versions upgrades. So keep them but add a version check or DB flag to make sure it only runs once. (the alternative would be to port them to migrations but that is likely too much work)
Repair steps
- RepairMimeTypes: still needed I guess
- FillEtags: if we made "etag" a NOT NULL column with default value, we wouldn't need this (need to check if we have code purposefuly writing null there on init)
- CleanTags: keep or make it a background job ?
- DropOldTables: exists since OC <= 8.1, already ran
- DropOldJobs: exists since OC <= 8.1, already ran
- RemoveGetETagEntries: exists since OC 8.2, already ran
- UpdateOutdatedOcsIds: exists since OC <= 8.1, already ran, likely obsolete now with the marketplace
- RepairInvalidShares: exists since OC 8.2. TODO need to verify if the conditions that get repaired can still be recreated with recent versions
- SharePropagation: added in OC 9.0, only needed to run once , convert to migration ?
- AvatarPermissions: Remove AvatarPermissions repair step #28975
- MoveAvatarOutsideHome: => keep to be able to support 8.2->future upgrades
- RemoveRootShares: added in OC 9.1. Keep, just in case, as we don't know what bug makes this happen. Might be expensive, so would be good to get rid of at some point.
- RepairUnmergedShares: runs for OC <= 9.1.0 entries, keep to support 8.2->future upgrades
Before upgrade repair steps
- InnoDB: at this point everyone should already have migrated since OC 8 or so
- SQliteAutoincrement: already since OC <= 8.1
- Collation: keep to support 8.2->future upgrades (move to migration?)
- SearchLuceneTables: deletes dupes in search lucene tables. Exists since 8.1. I suggest removing or moving it to the search lucene app itself.
Activity
PVince81 commentedon Sep 4, 2017
AvatarPermissions is actually obsolete since OC 10 because we don't even store avatars in the user's home any more, but in a separate "data/avatars" folder. So fixing the permissions there is pointless...
Maybe instead of a version check it could just check if the folder "data/avatars" exist, and if yes, skip the repair.
PVince81 commentedon Sep 11, 2017
I've updated the original post with the full list of repair steps as it exists on master. A lot could be removed as most have already run in OC 8.1/8.2.
ownclouders commentedon Dec 19, 2017
Hey, this issue has been closed because the label
status/STALEis set and there were no updates for 7 days. Feel free to reopen this issue if you deem it appropriate.[-]Review repair steps, add version checks[/-][+]Remove old repair steps, add version checks[/+]