BigW Consortium Gitlab
Artifacts are in the middle of being migrated from ci_builds to ci_job_artifacts. The expiration date is currently visible in both of these tables and the test for whether an expired artifact is present for a job is complex as it requires checking both the of the tables. Add two new indexes, one on ci_builds.artifacts_expire_at and one on ci_job_artifacts.expire_at to enable finding expired artifacts efficiently. And until the migration is finished, replace the SQL for finding expired and non-expired artifacts with a hand-crafted UNION ALL based query instead of using OR. This overcomes a database optimizer limitation that prevents it from using these indexes. When the migration is finished the next version should remove this query and replace it with a much simpler query on just ci_job_artifacts. See https://gitlab.com/gitlab-org/gitlab-ce/issues/42561 for followup.
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
build_trace_section_names.rb | Loading commit data... | |
builds.rb | Loading commit data... | |
group_variables.rb | Loading commit data... | |
job_artifacts.rb | Loading commit data... | |
pipeline_schedule.rb | Loading commit data... | |
pipeline_schedule_variables.rb | Loading commit data... | |
pipeline_variables.rb | Loading commit data... | |
pipelines.rb | Loading commit data... | |
runner_projects.rb | Loading commit data... | |
runners.rb | Loading commit data... | |
stages.rb | Loading commit data... | |
trigger_requests.rb | Loading commit data... | |
triggers.rb | Loading commit data... | |
variables.rb | Loading commit data... |