Loading
Scope GroupProjectTransferWorker concurrency limit per group
What does this MR do and why?
Makes Security::Policies::GroupProjectTransferWorker the first low-volume adopter of the per-top-level-group concurrency limit scope, behind its own group_project_transfer_worker_concurrency_limit_scope flag (gitlab_com_derisk, default off, checked against :instance).
One group transfer enqueues one job per project, so a large transfer can fill the worker's 200 slots and starve other groups' transfers. With max_percentage: 0.25, each top-level group gets at most 50 of the 200 slots.
Why this worker (GitLab.com, last 7 days, aggregates only):
- 2,062 completed jobs, p95 1.2 s
- 854 concurrency-limit deferral log lines
- 99.95% of jobs carry
meta.root_namespace, so the scope can attribute almost every job - the busiest top-level group accounts for about 68% of jobs, across 47 groups
This complements !269198 (merged), the high-volume adopter, which stays off until #637499.
Related to #636157
Rollout
- Flag:
group_project_transfer_worker_concurrency_limit_scope, rollout issue #636157 - Default off, so nothing changes on merge. Turn it on with
/chatops run feature set group_project_transfer_worker_concurrency_limit_scope true. - No changelog entry: the change is behind a flag that is off by default.
How to set up and validate locally
bundle exec rspec ee/spec/workers/security/policies/group_project_transfer_worker_spec.rbThe new examples assert the scope attributes and the enabled lambda with the flag on and off.
MR acceptance checklist
- Specs added and fail without the change
- RuboCop and pre-push checks pass