Rework update_assignee_cache_counts
What does this MR do?
This is follow-up issue for Multiple Issue Assignee
- Moves
update_assignee_cache_counts
to the service and reworks the logic around it - Makes updating of Issues and Merge requests more efficient by eliminating the need to calculate counters to warm the cache. Instead, it will be done on demand.
- Fixes the issue with cache invalidation when we create new issuable and assigning it during creation
Rest of issues that is not covered by this MR but are very related
- Invalidate cache when archive/unarchive project. The cache for every assignee should be invalidated.
- Invalidate cache for assignees when issuable is destroyed
Are there points in the code the reviewer needs to double check?
Why was this MR needed?
Screenshots (if relevant)
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
API support added - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together
What are the relevant issue numbers?
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/31873
Related issues: https://gitlab.com/gitlab-org/gitlab-ce/issues/31926 and https://gitlab.com/gitlab-org/gitlab-ce/issues/14054