1. 24 Jul, 2018 2 commits
  2. 16 Jul, 2018 1 commit
  3. 11 Jul, 2018 1 commit
  4. 10 Jul, 2018 1 commit
  5. 06 Jul, 2018 2 commits
  6. 05 Jul, 2018 1 commit
  7. 03 Jul, 2018 3 commits
    • Jan Provaznik's avatar
      66294b326fe1
    • Yorick Peterse's avatar
      Fixed pagination of web hook logs · 6e3a16de3ea0
      Yorick Peterse authored
      For reasons unknown, the logs of a web hook were paginated in memory.
      This would result in the "Edit" page of a web hook timing out once it
      has more than a few thousand log entries.
      
      This commit makes the following changes:
      
      1. We use LIMIT/OFFSET to paginate the data, instead of doing this in
         memory.
      
      2. We limit the logs to the last two days, just like the documentation
         says (instead of retrieving everything).
      
      3. We change the indexes on "web_hook_logs" so the query to get the data
         can perform a backwards index scan, without the need for a Filter.
      
      These changes combined ensure that Projects::HooksController#edit no
      longer times out.
      6e3a16de3ea0
    • Jarka Kadlecová's avatar
      Support todos for epics backport · 1e98b8cb1afb
      Jarka Kadlecová authored
      1e98b8cb1afb
  8. 02 Jul, 2018 1 commit
  9. 26 Jun, 2018 1 commit
  10. 08 Jun, 2018 1 commit
  11. 05 Jun, 2018 3 commits
  12. 04 Jun, 2018 1 commit
  13. 01 Jun, 2018 2 commits
  14. 31 May, 2018 5 commits
  15. 30 May, 2018 3 commits
  16. 29 May, 2018 2 commits
  17. 28 May, 2018 1 commit
    • Yorick Peterse's avatar
      Added partial index for merge requests · 23d2b824565a
      Yorick Peterse authored
      This index is added on `(target_project_id, iid)` and has a `WHERE state
      = 'opened'` condition. Using this index we can drastically improve the
      performance of the query used to count the total number of merge
      requests in a group. Without this index the query would eventually
      perform the following:
      
          ->  Index Scan using index_merge_requests_on_target_project_id_and_iid on merge_requests  (cost=0.43..4.89 rows=7 width=4) (actual time=0.058..0.353 rows=6 loops=228)
                Index Cond: (target_project_id = projects.id)
                Filter: ((state)::text = 'opened'::text)
                Rows Removed by Filter: 141
                Buffers: shared hit=34351 dirtied=1
      
      Out of the ~180 milliseconds the entire query would take, around 170
      milliseconds was spent in just this segment. With the index in place,
      the above segment is turned into the following:
      
          ->  Index Only Scan using yorick_test on merge_requests  (cost=0.42..0.55 rows=7 width=4) (actual time=0.004..0.010 rows=6 loops=228)
                Index Cond: (target_project_id = projects.id)
                Heap Fetches: 419
                Buffers: shared hit=1381
      
      The index also reduces the total query time to roughly 10 milliseconds.
      23d2b824565a
  18. 25 May, 2018 2 commits
  19. 24 May, 2018 1 commit
    • Oswaldo Ferreira's avatar
      Persist truncated note diffs on a new table · 0a18f8bad891
      Oswaldo Ferreira authored
      We request Gitaly in a N+1 manner to build discussion diffs. Once the diffs are from different revisions, it's hard to make a single request to the service in order to build the whole response.
      With this change we solve this problem and simplify a lot fetching this piece of info.
      0a18f8bad891
  20. 22 May, 2018 1 commit
  21. 21 May, 2018 1 commit
  22. 15 May, 2018 2 commits
    • Stan Hu's avatar
      Add a unique and not null constraint on the project_features.project_id column · 240f12998a18
      Stan Hu authored
      This commit has two migrations:
      
      1. The first prunes duplicate rows in the project_features table and leaves
         the row with the highest ID.  Since the behavior was indeterministic before
         and depended on which row the database decided to use, this change at least
         makes the permissions consistent. For example, in some cases, the Wiki may
         have been disabled but enabled in another entry.
      
      2. The second adds a non-null constraint on the project_features.project_id
         column.
      
      Closes #37882
      
      Fixes a significant part of gitlab-com/migration#408.
      
      We found that we were overcounting Wikis because of these duplicates.
      On GitLab.com, there are 56 rows with duplicate entries by project_id, and 16,661 rows with NULL project_id values.
      240f12998a18
    • Dylan Griffith's avatar
      Add index on runner_type for ci_runners · ff7229345af1
      Dylan Griffith authored
      We use this to filter runner and will use this increasingly in future
      instead of is_shared so it should be indexed
      ff7229345af1
  23. 09 May, 2018 2 commits