Skip to content
Snippets Groups Projects
  1. Feb 08, 2018
    • Gregory Stark's avatar
      Add indexes and change SQL for expired artifacts to deal with artifacts migration efficiently · 271e7a32
      Gregory Stark authored
      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.
      271e7a32
  2. Feb 06, 2018
  3. Dec 21, 2017
  4. Dec 14, 2017
  5. Dec 03, 2017
  6. Oct 30, 2017
  7. Oct 05, 2017
  8. Sep 04, 2017
  9. Sep 03, 2017
  10. Aug 25, 2017
  11. Aug 16, 2017
  12. Aug 02, 2017
  13. Jul 28, 2017
  14. Jul 20, 2017
  15. Jul 17, 2017
Loading