Skip to content

Refactor ConcurrencyLimit::WorkersMap into WorkerAttributes and fix gaps in workers with default concurrency limit

In gitlab-org/gitlab!194881 (diffs), we removed setting default concurrency_limit -> { 0 } to all workers in place of calculating a default limit based on percentage of sidekiq capacity gitlab-org/gitlab!194881 (diffs).

However, because we no longer set concurrency_limit -> { 0 } attribute explicitly, it created a gap in some places:

  1. ConcurrencyLimitSampler no longer samples from all workers as @data no longer contains all workers.
  2. ResumeWorker also only resumes workers in @data, even though workers with the default concurrency limit from the percentage-based are still subject to concurrency limiter.

This is also related to the discussion in gitlab-org/gitlab!194881 (comment 2620019914)

After this has been fixed, we should see the concurrency dashboard showing all workers.

Edited by Marco Gregorius
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information