Skip to content
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

Remove old repair steps, add version checks #28902

Open
3 of 17 tasks
PVince81 opened this issue Sep 4, 2017 · 3 comments
Open
3 of 17 tasks

Remove old repair steps, add version checks #28902

PVince81 opened this issue Sep 4, 2017 · 3 comments

Comments

@PVince81
Copy link
Contributor

PVince81 commented Sep 4, 2017

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.

@DeepDiver1975 @tomneedham @butonic @phisch

@PVince81
Copy link
Contributor Author

PVince81 commented 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
Copy link
Contributor Author

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
Copy link
Contributor

Hey, this issue has been closed because the label status/STALE is set and there were no updates for 7 days. Feel free to reopen this issue if you deem it appropriate.

@phil-davis phil-davis reopened this Dec 19, 2017
@PVince81 PVince81 modified the milestones: triage, maybe some day May 22, 2018
@PVince81 PVince81 changed the title Review repair steps, add version checks Remove old repair steps, add version checks Jul 27, 2018
@PVince81 PVince81 added the v11 label Oct 13, 2018
@PVince81 PVince81 modified the milestones: maybe some day, backlog Oct 13, 2018
@micbar micbar removed the v11 label Jan 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants