Skip to content

Eager load event target authors whenever possible

What does this MR do?

This ensures that the "author" association of an event's "target" association is eager loaded whenever the "target" association defines an "author" association. This in turn solves the N+1 query problem we first tried to solve in !15788 (merged) but caused problems when displaying milestones as those don't define an "author" association.

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/41618

cc @stanhu @fjsanpedro

Edited by Yorick Peterse

Merge request reports