gitlab-org--gitlab-foss/spec
Sean McGivern 0206476ae2 Fix some N+1s when calculating notification recipients
First N+1: we may have loaded a user's notification settings already, but not
have loaded their sources. Because we're iterating through, we'd potentially
load sources that are completely unrelated, just because they belong to this
user.

Second N+1: we do a separate query for each user who could be subscribed to or
unsubcribed from the target. It's actually more efficient in this case to get
all subscriptions at once, as we will need to check most of them.

We can fix both by the slightly unpleasant means of checking IDs manually,
rather than object equality.
2018-06-07 12:37:57 +01:00
..
bin
config
controllers Log response body to production_json.log when a controller responds with a 422 status 2018-06-06 13:16:15 -07:00
db/production
factories Add missing tests around rendering invalid merge requests (HTML+JSON) 2018-06-06 08:18:40 +10:00
features group runners 2018-06-06 21:01:45 +09:00
finders
fixtures Merge branch '42751-rename-mr-maintainer-push' into 'master' 2018-06-05 15:04:18 +00:00
graphql Initial setup GraphQL using graphql-ruby 1.8 2018-06-06 10:58:54 +02:00
helpers Resolve "Introduce new navigation themes in GitLab 11.0" 2018-06-07 07:37:02 +00:00
initializers Fix Fog mocking 2018-06-05 16:48:42 +02:00
javascripts Merge branch 'ide-merge-requests-components' into 'master' 2018-06-06 15:49:06 +00:00
lib Merge branch 'fj-move-rev-list-option' into 'master' 2018-06-07 08:18:50 +00:00
mailers Replace have_html_espaced_body_text after 517598ba 2018-06-03 22:29:51 +09:00
migrations Migrate jobs in object_storage_upload queue 2018-06-05 20:37:01 +02:00
models Merge branch '47208-human-import-status-name-not-working' into 'master' 2018-06-07 09:24:51 +00:00
policies Rephrase "maintainer" to more precise "members who can merge to the target branch" 2018-06-01 14:33:12 +09:00
presenters
requests Merge branch '45505-lograge_formatter_encoding' into 'master' 2018-06-07 09:26:24 +00:00
routing Initial setup GraphQL using graphql-ruby 1.8 2018-06-06 10:58:54 +02:00
rubocop/cop
serializers Merge branch 'master' into 'backstage/gb/use-persisted-stages-to-improve-pipelines-table' 2018-06-05 07:39:59 +00:00
services Fix some N+1s when calculating notification recipients 2018-06-07 12:37:57 +01:00
sidekiq/cron
support Merge branch 'live-trace-v2-persist-data' into 'master' 2018-06-06 12:45:41 +00:00
tasks Find and mark more Git disk access locations 2018-06-05 15:51:14 +00:00
unicorn
uploaders Merge branch 'fix-fog-mocking' into 'master' 2018-06-05 15:26:14 +00:00
validators Add validation to webhook and service URLs to ensure they are not blocked because of SSRF 2018-06-01 11:43:53 +00:00
views
workers Support LFS objects when creating a project by import 2018-06-06 16:42:18 +00:00
factories_spec.rb
fast_spec_helper.rb
rails_helper.rb
rake_helper.rb
simplecov_env.rb
spec_helper.rb Fix Fog mocking 2018-06-05 16:48:42 +02:00