Skip to content

Rework update_assignee_cache_counts

Valery Sizov requested to merge update_assignee_cache_counts_refactoring into master

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?

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

Merge request reports