1. 03 12月, 2017 5 次提交
    • Z
      Add unique index on job_id and file_type · 592e0877
      Zeger-Jan van de Weg 提交于
      592e0877
    • Z
      Fix most test failures · c7d94575
      Zeger-Jan van de Weg 提交于
      c7d94575
    • Z
      Rename Artifact to JobArtifact, split metadata out · 61864a5a
      Zeger-Jan van de Weg 提交于
      Two things at ones, as there was no clean way to seperate the commit and
      give me feedback from the tests.
      
      But the model Artifact is now JobArtifact, and the table does not have a
      type anymore, but the metadata is now its own model:
      Ci::JobArtifactMetadata.
      61864a5a
    • Z
      Create Ci::Artifacts · 25df6661
      Zeger-Jan van de Weg 提交于
      To allow jobs/builds to have multiple artifacts, and to start seperating
      concerns from Ci::Build a new model is created: Ci::Artifact.
      
      Changes include the updating of the ArtifactUploader to adapt to a
      slightly different interface. The uploader expects to be initialized
      with a `Ci::Build`.
      
      Futher a migration with the minimal fields, the needed foreign keys and
      an index.
      
      Last, the way this works is by prepending a module to Ci::Build so we
      can basically override behaviour but if needed use `super` to get the
      original behaviour.
      25df6661
    • Z
      Create ci_artifacts table · 8ac7f297
      Zeger-Jan van de Weg 提交于
      8ac7f297
  2. 29 11月, 2017 4 次提交
    • B
      Reschedule the migration to populate fork networks · e03d4a20
      Bob Van Landuyt 提交于
      Rescheduling will make sure the fork networks with a deleted source
      project are created.
      e03d4a20
    • A
      Add timeouts for Gitaly calls · 64e5f996
      Andrew Newdigate 提交于
      64e5f996
    • S
      Improve indexes on merge_request_diffs · 484ae2ee
      Sean McGivern 提交于
      For getting the SHAs from an MR to find pipelines, we get the last 100 MR diffs
      for the MR, and find commits from those. This was un-indexed before, because the
      index was not a composite index on merge_request_diff_id, id. Changing that
      means that this scope can exclusively use indexes.
      484ae2ee
    • S
      Remove serialised diff and commit columns · 4ebbfe5d
      Sean McGivern 提交于
      The st_commits and st_diffs columns on merge_request_diffs historically held the
      YAML-serialised data for a merge request diff, in a variety of formats.
      
      Since 9.5, these have been migrated in the background to two new tables:
      merge_request_diff_commits and merge_request_diff_files. That has the advantage
      that we can actually query the data (for instance, to find out how many commits
      we've stored), and that it can't be in a variety of formats, but must match the
      new schema.
      
      This is the final step of that journey, where we drop those columns and remove
      all references to them. This is a breaking change to the importer, because we
      can no longer import diffs created in the old format, and we cannot guarantee
      the export will be in the new format unless it was generated after this commit.
      4ebbfe5d
  3. 24 11月, 2017 3 次提交
  4. 23 11月, 2017 1 次提交
  5. 22 11月, 2017 2 次提交
    • S
      Add environment_scope to cluster table · 98bb78a4
      Shinya Maeda 提交于
      98bb78a4
    • Y
      Update composite pipelines index to include "id" · aafe5c12
      Yorick Peterse 提交于
      This updates the composite index on ci_pipelines (project_id, ref,
      status) to also include the "id" column at the end. Adding this column
      to the index drastically improves the performance of queries used for
      getting the latest pipeline for a particular branch. For example, on
      project dashboards we'll run a query like the following:
      
          SELECT ci_pipelines.*
          FROM ci_pipelines
          WHERE ci_pipelines.project_id = 13083
          AND ci_pipelines.ref = 'master'
          AND ci_pipelines.status = 'success'
          ORDER BY ci_pipelines.id DESC
          LIMIT 1;
      
          Limit  (cost=0.43..58.88 rows=1 width=224) (actual time=26.956..26.956 rows=1 loops=1)
            Buffers: shared hit=6544 dirtied=16
            ->  Index Scan Backward using ci_pipelines_pkey on ci_pipelines  (cost=0.43..830922.89 rows=14216 width=224) (actual time=26.954..26.954 rows=1 loops=1)
                  Filter: ((project_id = 13083) AND ((ref)::text = 'master'::text) AND ((status)::text = 'success'::text))
                  Rows Removed by Filter: 6476
                  Buffers: shared hit=6544 dirtied=16
          Planning time: 1.484 ms
          Execution time: 27.000 ms
      
      Because of the lack of "id" in the index we end up scanning over the
      primary key index, then applying a filter to filter out any remaining
      rows. The more pipelines a GitLab instance has the slower this will get.
      
      By adding "id" to the mentioned composite index we can change the above
      plan into the following:
      
          Limit  (cost=0.56..2.01 rows=1 width=224) (actual time=0.034..0.034 rows=1 loops=1)
            Buffers: shared hit=5
            ->  Index Scan Backward using yorick_test on ci_pipelines  (cost=0.56..16326.37 rows=11243 width=224) (actual time=0.033..0.033 rows=1 loops=1)
                  Index Cond: ((project_id = 13083) AND ((ref)::text = 'master'::text) AND ((status)::text = 'success'::text))
                  Buffers: shared hit=5
          Planning time: 0.695 ms
          Execution time: 0.061 ms
      
      This in turn leads to a best-case improvement of roughly 25
      milliseconds, give or take a millisecond or two.
      aafe5c12
  6. 20 11月, 2017 1 次提交
  7. 17 11月, 2017 2 次提交
  8. 10 11月, 2017 1 次提交
  9. 08 11月, 2017 2 次提交
  10. 07 11月, 2017 1 次提交
  11. 06 11月, 2017 4 次提交
  12. 03 11月, 2017 3 次提交
  13. 02 11月, 2017 3 次提交
  14. 01 11月, 2017 3 次提交
  15. 23 10月, 2017 2 次提交
  16. 17 10月, 2017 1 次提交
  17. 13 10月, 2017 1 次提交
  18. 07 10月, 2017 1 次提交