1. 31 Mar, 2021 1 commit
    • Dylan Griffith's avatar
      Remove N+1 queries from indexing issues · ed693eec
      Dylan Griffith authored
      The `#as_indexed_json` method is used to convert individual documents to
      the JSON that is sent to Elasticsearch during indexing. We need to
      preload the data before it gets to this method. We implemented the
      `.preload_indexing_data` method in
      https://gitlab.com/gitlab-org/gitlab/-/merge_requests/56808 so we just
      need to add this to the various classes now. This MR updates it for
      `Issue` only.
      
      We also slightly refactor the issue_instance_proxy since it's more
      efficient to just use the `user_id` from the `issue_assignees` join
      table than to join again to `users` and also since it wasn't possible to
      get the preload to work without loading all of `users.*` which would be
      wasteful for a wide table and large numbers of records.
      ed693eec
  2. 30 Mar, 2021 6 commits
  3. 29 Mar, 2021 33 commits