Skip to content
Snippets Groups Projects
  1. Feb 17, 2020
  2. Jan 28, 2020
  3. Jan 09, 2020
  4. Dec 17, 2019
  5. Oct 23, 2019
  6. Oct 16, 2019
  7. Sep 17, 2019
  8. Sep 06, 2019
  9. Aug 09, 2019
  10. Jul 31, 2019
  11. Jul 29, 2019
  12. Jul 25, 2019
  13. Jun 07, 2019
  14. May 07, 2019
  15. Apr 09, 2019
  16. Apr 08, 2019
  17. Apr 05, 2019
  18. Apr 04, 2019
    • Sean McGivern's avatar
      Extend CTE search optimisation to projects · 10ceb33b
      Sean McGivern authored
      When we use the `search` param on an `IssuableFinder`, we can run into
      issues. We have trigram indexes to support these searches. On
      GitLab.com, we often see Postgres's optimiser prioritise the (global)
      trigram indexes over the index on `project_id`. For group and project
      searches, we know that it will be quicker to filter by `project_id`
      first, as it returns fewer rows in most cases.
      
      For group issues search, we ran into this issue previously, and went
      through the following iterations:
      
      1. Use a CTE on the project IDs as an optimisation fence. This prevents
         the planner from disregarding the index on `project_id`.
         Unfortunately it breaks some types of sorting, like priority and
         popularity, as they sort on a joined table.
      2. Use a subquery for listing issues, and a CTE for counts. The subquery
         - in the case of group lists - didn't help as much as the CTE, but
         was faster than not including it. We can safely use a CTE for counts
         as they don't have sorting.
      
      Now, however, we're seeing the same issue in a project context. The
      subquery doesn't help at all there (it would only return one row, after
      all). In an attempt to keep total code complexity under control, this
      commit removes the subquery optimisation and applies the CTE
      optimisation only for sorts we know that are safe.
      
      This means that for more complicated sorts (like priority and
      popularity), the search will continue to be very slow. If this is a
      high-priority issue, we can consider introducing further optimisations,
      but this finder is already very complicated and additional complexity
      has a cost.
      
      The group CTE optimisation is controlled by the same feature flag as
      before, `attempt_group_search_optimizations`, which is enabled by
      default. The new project CTE optimisation is controlled by a new feature
      flag, `attempt_project_search_optimizations`, which is disabled by
      default.
      10ceb33b
  19. Mar 21, 2019
  20. Mar 19, 2019
  21. Feb 28, 2019
    • Mario de la Ossa's avatar
      Always use CTE for IssuableFinder counts · 39afba06
      Mario de la Ossa authored
      Since the CTE is faster than a subquery and the only reason we're using
      a subquery is that the CTE can't handle sorting by certain attributes,
      let's use the CTE always (when the feature flag is enabled) when
      counting, since we can ignore ordering if we just want a count of
      results.
      Unverified
      39afba06
  22. Feb 26, 2019
  23. Feb 25, 2019
  24. Feb 22, 2019
  25. Feb 21, 2019
  26. Jan 14, 2019
  27. Dec 31, 2018
  28. Nov 30, 2018
    • Sean McGivern's avatar
      Add a flag to use a subquery for group issues search · 7fd5dbf9
      Sean McGivern authored
      We already had a flag to use a CTE, but this broke searching in some
      cases where we need to sort by a joined table. Disabling the CTE flag
      makes searches much slower.
      
      The new flag, to use a subquery, makes them slightly slower than the
      CTE, while maintaining correctness. If both it and the CTE flag are
      enabled, the subquery takes precedence.
      7fd5dbf9
  29. Nov 23, 2018
    • Jacopo's avatar
      Filter by `None`/`Any` for labels in issues/mrs API · c068ac67
      Jacopo authored
      By using the parameters `?labels=None|Any` the user can filter
      issues/mrs from the API that has `none/any` label.
      
      Affected endpoints are:
      
      - /api/issues
      - /api/projects/:id/issues
      - /api/groups/:id/issues
      - /api/merge_requests
      - /api/projects/:id/merge_requests
      - /api/groups/:id/merge_requests
      c068ac67
  30. Oct 31, 2018
  31. Oct 26, 2018
  32. Oct 03, 2018
  33. Oct 01, 2018
  34. Jul 11, 2018
  35. May 21, 2018
  36. Mar 05, 2018
Loading