Skip to content

Improve performance of expire build artifacts worker

What does this MR do?

This MR improves the performance of ExpireBuildArtifactsWorker, which is currently unable to run because of statement time on gitlab.com scale.

Mainly, there are two improvements.

  • Scope out legacy artifacts from the query as it's already been migrated to new artifacts
  • Use EachBatch to efficiently walkthrough gigantic ci_builds table (over 100M rows)

What are the relevant issue numbers?

Close https://gitlab.com/gitlab-org/gitlab-ce/issues/41057

Does this MR meet the acceptance criteria?

Edited by Shinya Maeda

Merge request reports