diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2018-04-18 15:41:42 +0200 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2018-04-18 15:51:39 +0200 |
commit | 6f292eaa69c771cec8a81d2edaad19a26ab3eae6 (patch) | |
tree | 30ef0c062121834b2dca4f4a87bc7af72e071962 /app/models/group.rb | |
parent | 019c0d5761b55ca21fd71d547dd4a2ebf14d615f (diff) | |
download | gitlab-ce-6f292eaa69c771cec8a81d2edaad19a26ab3eae6.tar.gz |
Revert the addition of goldiloader
This reverts the addition of the "goldiloader" Gem and all use of it.
While this Gem is very promising it's causing a variety of problems on
GitLab.com due to it eager-loading too much data in places where we
don't expect/can handle this. At least for the time being this means we
have to go back to manually fixing N+1 query problems, but at least
those should not cause a negative impact on availability.
Diffstat (limited to 'app/models/group.rb')
-rw-r--r-- | app/models/group.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/group.rb b/app/models/group.rb index 202988d743d..8ff781059cc 100644 --- a/app/models/group.rb +++ b/app/models/group.rb @@ -12,9 +12,9 @@ class Group < Namespace has_many :group_members, -> { where(requested_at: nil) }, dependent: :destroy, as: :source # rubocop:disable Cop/ActiveRecordDependent alias_method :members, :group_members - has_many :users, -> { auto_include(false) }, through: :group_members + has_many :users, through: :group_members has_many :owners, - -> { where(members: { access_level: Gitlab::Access::OWNER }).auto_include(false) }, + -> { where(members: { access_level: Gitlab::Access::OWNER }) }, through: :group_members, source: :user @@ -23,7 +23,7 @@ class Group < Namespace has_many :milestones has_many :project_group_links, dependent: :destroy # rubocop:disable Cop/ActiveRecordDependent - has_many :shared_projects, -> { auto_include(false) }, through: :project_group_links, source: :project + has_many :shared_projects, through: :project_group_links, source: :project has_many :notification_settings, dependent: :destroy, as: :source # rubocop:disable Cop/ActiveRecordDependent has_many :labels, class_name: 'GroupLabel' has_many :variables, class_name: 'Ci::GroupVariable' |