BigW Consortium Gitlab

  1. 20 Nov, 2017 1 commit
  2. 17 Nov, 2017 1 commit
  3. 06 Nov, 2017 1 commit
  4. 15 Sep, 2017 1 commit
    • Fix setting share_with_group_lock · ac702af8
      Yorick Peterse authored
      Prior to this commit running
      Namespace#force_share_with_group_lock_on_descendants would result in
      updating _all_ namespaces in the namespaces table, not just the
      descendants. This is the result of ActiveRecord::Relation#update_all not
      taking into account the CTE. To work around this we use the CTE query as
      a sub-query instead of directly calling #update_all.
      
      To prevent this from happening the relations returned by
      Gitlab::GroupHierarchy are now marked as read-only, resulting in an
      error being raised when methods such as #update_all are used.
      
      Fortunately on GitLab.com our statement timeouts appear to have
      prevented this query from actually doing any damage other than causing
      a very large amount of dead tuples.
      
      Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/37916
  5. 14 Sep, 2017 2 commits
  6. 29 Aug, 2017 1 commit
    • Improve migrations using triggers · 5eab624d
      Yorick Peterse authored
      This adds a bunch of checks to migrations that may create or drop
      triggers. Dropping triggers/functions is done using "IF EXISTS" so we
      don't throw an error if the object in question has already been dropped.
      We now also raise a custom error (message) when the user does not have
      TRIGGER privileges. This should prevent the schema from entering an
      inconsistent state while also providing the user with enough information
      on how to solve the problem.
      
      The recommendation of using SUPERUSER permissions is a bit extreme but
      we require this anyway (Omnibus also configures users with this
      permission).
      
      Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/36633
  7. 23 Aug, 2017 1 commit
  8. 22 Aug, 2017 1 commit
  9. 20 Aug, 2017 1 commit
    • Fix Error 500s when attempting to destroy a protected tag · 718ecd4e
      Stan Hu authored
      Due to a missing `on_delete: :cascade`, users would hit the error that
      looked like:
      
      ```
      PG::ForeignKeyViolation: ERROR: update or delete on table "protected_tags"
      violates foreign key constraint "fk_rails_f7dfda8c51" on table
      "protected_tag_create_access_levels" DETAIL: Key (id)=(1385) is still
      referenced from table "protected_tag_create_access_levels". : DELETE FROM
      "protected_tags" WHERE "protected_tags"."id" = 1385
      ```
      
      Closes #36013
  10. 18 Jul, 2017 1 commit
  11. 11 Jul, 2017 1 commit
  12. 07 Jul, 2017 7 commits
  13. 29 Jun, 2017 1 commit
    • Added code for defining SHA attributes · af1f6844
      Yorick Peterse authored
      These attributes are stored in binary in the database, but exposed as
      strings. This allows one to query/create data using plain SHA1 hashes as
      Strings, while storing them more efficiently as binary.
  14. 27 Jun, 2017 2 commits
  15. 26 Jun, 2017 11 commits
  16. 21 Jun, 2017 2 commits
  17. 19 Jun, 2017 1 commit
    • Put an upper limit on update batches · 9a3bea67
      Yorick Peterse authored
      When using update_column_in_batches the upper limit on the batch size is
      now 1000. This ensures that for very large tables we don't lock tens of
      thousands of rows during the update. This in turn should reduce the
      likelyhood of running into deadlocks.
  18. 13 Jun, 2017 1 commit
  19. 25 May, 2017 1 commit
  20. 18 May, 2017 1 commit
  21. 15 May, 2017 1 commit