Fix excessive DB access in set_assignees mutation
What does this MR do?
Addresses #36098 (closed)
This fixes the excessive DB access in the MergeRequest::SetAssignee
mutation, bringing the
DB query count from ~175 to ~30 (depending on the operation).
This is accomplished by avoiding the excessively powerful MergeRequests::UpdateService
, which
does tracking and checks that we know statically are unnecessary. Expensive (but necessary) N+1 operations
are moved to a background worker.
Does this MR meet the acceptance criteria?
Conformity
-
📋 Does this MR need a changelog?-
I have included a changelog entry. -
I have not included a changelog entry because _____.
-
-
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process.
Edited by Alex Kalderimis