• Sean McGivern's avatar
    Remove duplicate authorization refresh on project create · c85831f7
    Sean McGivern authored
    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 https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/13775, 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 (https://gitlab.com/gitlab-org/gitlab/-/merge_requests/2787),
    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:
    https://gitlab.com/gitlab-org/gitlab/-/merge_requests/2831
    
    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.
    c85831f7
remove-duplicate-auth-refresh-on-project-create.yml 129 Bytes