Skip to content

Remove old repair steps, add version checks #28902

Closed as not planned
Closed as not planned

Description

@PVince81

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

Activity

  1. added this to the triage milestone on Sep 4, 2017
  2. PVince81 commented on Sep 4, 2017

    @PVince81
    ContributorAuthor

    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.

  3. PVince81 commented on Sep 11, 2017

    @PVince81
    ContributorAuthor

    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.

  4. ownclouders commented on Dec 19, 2017

    @ownclouders
    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.

  5. changed the title [-]Review repair steps, add version checks[/-] [+]Remove old repair steps, add version checks[/+] on Jul 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions