Skip to content

[perf] MIME type repair step takes hours on large instances #48698

@susnux

Description

Running the MIME type repair step can take up to multiple hours on large instances, as the filecache table is pretty huge.

A possible solution would be to do this not within the repair steps but only start a background job from the repair step that then will do the repair in chunks.
E.g.

  1. Get the current largest fileid
  2. start a background job A with (start=0, end=fileid)
  3. Update the mime types in that background job but only in the chunk [start, min(start+5000, end)]
  4. start the background job again from that background job with (start = start + 5000, end=fileid) if needed

(5000 is just taken as an example as this should not lock the table on mysql and thus should not block the production instance too heavily).

cc @juliushaertl

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions