1. 29 Apr, 2016 2 commits
  2. 25 Apr, 2016 1 commit
  3. 19 Apr, 2016 2 commits
  4. 16 Apr, 2016 1 commit
  5. 13 Apr, 2016 1 commit
  6. 12 Apr, 2016 1 commit
  7. 11 Apr, 2016 1 commit
  8. 07 Apr, 2016 3 commits
  9. 01 Apr, 2016 2 commits
  10. 31 Mar, 2016 1 commit
  11. 30 Mar, 2016 1 commit
  12. 23 Mar, 2016 1 commit
  13. 22 Mar, 2016 2 commits
  14. 21 Mar, 2016 6 commits
  15. 20 Mar, 2016 4 commits
  16. 19 Mar, 2016 2 commits
    • Yorick Peterse's avatar
      Cache output of Repository#exists? · 2c904501c8a2
      Yorick Peterse authored
      This caches the output of Repository#exists? in Redis while making sure
      it's flushed properly when creating new repositories, deleting them,
      etc.
      
      For the ProjectWiki tests to work I had to make ProjectWiki#create_repo!
      public as testing private methods in RSpec is a bit of a pain.
      2c904501c8a2
    • Felipe Artur's avatar
      Fix specs · 27db6423b217
      Felipe Artur authored
      27db6423b217
  17. 18 Mar, 2016 1 commit
  18. 17 Mar, 2016 1 commit
    • Yorick Peterse's avatar
      Cache project avatars stored in Git · 3e38fbd7665d
      Yorick Peterse authored
      The avatar logic has been moved from Project to Repository as this makes
      caching easier. The logic itself in turn has been changed so that the
      logo file names are cached in Redis. This cache is flushed upon pushing
      a commit but _only_ if:
      
      1. The commit was pushed to the default branch
      2. The commit actually changes any of the logo files
      
      If no branch or commit is given the cache is flushed anyway, this
      ensures that calling Repository#expire_cache without any arguments still
      flushes the avatar cache (e.g. this is used when removing a project).
      
      Fixes gitlab-org/gitlab-ce#14363
      3e38fbd7665d
  19. 15 Mar, 2016 2 commits
    • Yorick Peterse's avatar
      Ignore eager loading in Project.search UNION · 26b126f838c7
      Yorick Peterse authored
      The queries that are UNION'd together don't need any eager loading
      (since we really only use the resulting SQL instead of having
      ActiveRecord actually run the queries). By dropping any eager loaded
      associations queries such as the following work instead of producing a
      SQL error:
      
          Project.all.includes(:namespace).search('foo')
      26b126f838c7
    • Kamil Trzcinski's avatar
      Return the external issue tracker even if it's null · 2f5dd62ab64d
      Kamil Trzcinski authored
      This solves the problem with caching the nil value with instance variable.
      Without this the every time we ask for external_issue_tracker we built AR and potentially do SQL query
      2f5dd62ab64d
  20. 13 Mar, 2016 1 commit
  21. 11 Mar, 2016 4 commits
    • Baldinof's avatar
      Close merge requests when removing fork relation · 9ef06bcb0cc3
      Baldinof authored
      9ef06bcb0cc3
    • Yorick Peterse's avatar
      Removed arel_table receiver from search methods · 4053214d5b6d
      Yorick Peterse authored
      We can just use "arel_table" in these cases instead of
      "SomeClass.arel_table".
      4053214d5b6d
    • Yorick Peterse's avatar
      Use ILIKE in Project.search_by_title · be12a3a0e063
      Yorick Peterse authored
      Similar to the changes made to Project.search the method
      Project.search_by_title now also uses Arel so it can automatically use
      ILIKE/LIKE instead of the lower() function.
      be12a3a0e063
    • Yorick Peterse's avatar
      Use ILIKE/LIKE + UNION in Project.search · 63941313f540
      Yorick Peterse authored
      This chance is broken up in two steps:
      
      1. Use ILIKE on PostgreSQL and LIKE on MySQL, instead of using
         "WHERE lower(x) LIKE lower(y)" as ILIKE is significantly faster than
         using lower(). In many cases the use of lower() will force a slow
         sequence scan.
      
      2. Instead of using 1 query that searches both projects and namespaces
         using a JOIN we're using 2 separate queries that are UNION'd
         together. Using a JOIN would force a slow sequence scan, using a
         UNION avoids this.
      
      This method now uses Arel as Arel automatically uses ILIKE on PostgreSQL
      and LIKE on MySQL, removing the need to handle this manually.
      63941313f540