Skip to content

Remove duplicate authorization refresh on project create

What does this MR do?

When we create a project in a group, we need to refresh the project_authorizations table for all of the group's members to give them access to the new project.

In gitlab-foss!13775 (merged), we split this refresh up:

  1. The creator of the project had their permissions refreshed immediately.
  2. All of the other group members had their permissions refreshed asynchronously, as they could wait a few seconds to see the new project with no major impact.

Unfortunately, in the corresponding merge to our EE codebase (!2787 (merged)), we didn't remove the existing refresh. From this point on, we had a third refresh for EE installs: for all group members, we'd refresh permissions and wait (even though we were also doing this asynchronously).

Later, as this was a line that was in EE but not in the FOSS version, we extracted it to the ee/ directory: !2831 (merged)

The upshot of all of this is:

  1. EE distributions have been double-scheduling background jobs. If a group has 10 users, we'd schedule 20 jobs rather than 10. FOSS distributions would just schedule 10.
  2. EE distributions have also been slower, because the second batch of 10 scheduled jobs would block the HTTP response from happening until they completed, or 10 seconds passed - whichever is sooner.
  3. This has given no correctness benefit: FOSS has behaved correctly thoroughout this period without the extra refresh.

So this is safe to remove.

See gitlab-com/gl-infra/scalability#168 (closed).

Merge request reports

Loading