Stop AuthorizedProjectsWorker double scheduling in Projects::CreateService
Queue: authorized_projects
When we add a project to a group, we refresh the permissions of members of the group to include this new project. Unfortunately, in EE, we do this twice:
- https://gitlab.com/gitlab-org/gitlab/-/blob/v12.7.0-ee/app/services/projects/create_service.rb#L104-106 (non-blocking)
- https://gitlab.com/gitlab-org/gitlab/-/blob/v12.7.0-ee/ee/app/services/ee/projects/create_service.rb#L52 (blocking)
This is wasteful and directly contributes to the queue size of this job. We should:
- Do some git history spelunking to see why this is. (Per Chesterton's fence, we shouldn't just blindly remove the second call.)
- Remove the second call if we can. (If we can't, we need to re-think more dramatically.)
- Monitor the results. I estimated in #148 (comment 287652937) that this could save over 30% of the jobs we currently schedule in this queue.
Edited by Andrew Newdigate