Skip to content

Reschedule project authorizations in a migration

yorickpeterse-staging requested to merge reschedule-project-authorizations into master

This reschedules calculating of project authorizations in batches. Each batch is scheduled 10 minutes after the previous batch in an attempt to spread the load around a bit more. Based on the number of users on GitLab.com this means the last batch will be scheduled to run ±37 hours after the migration runs.

Expected impact:

  • For 2-3 days we'll be re-calculating all the permissions
  • This will increase table bloat in project_authorizations
  • Database load on the primary will most likely go up due to the large number of queries that will be executed
  • Sidekiq has a set of dedicated workers for this queue, so the impact on other queues should be minimal
  • Scheduling a single batch of 5000 jobs takes around 1.8 seconds locally, this may vary on production

cc @stanhu @pcarranza @DouweM

Merge request reports