Skip to content

Decrease enqueue waiting time for registry migration

João Pereira requested to merge reduce-euqueue-waiting-times into master

Context

This is related to the GitLab.com Container Registry migration phase 2 (&5523 (closed)), which is driven by GitLab Rails (&7316 (closed)).

Problem

As explained in &7316 (comment 897867569), under Feature flags, we have a few enqueuing waiting delays which are toggled by specific feature flags, namely:

  • container_registry_migration_phase2_enqueue_speed_slow: When enabled, migration enqueue waiting time is set to 6 hours.
  • container_registry_migration_phase2_enqueue_speed_fast: When enabled, there is no migration enqueuer waiting time.
  • If both of the above feature flags are disabled, the default value is 1 hour.

Both the default and slow waiting times (1 and 6 hours, respectively) have proven to be higher than necessary and therefore end up slowing down the migration progress.

More importantly, when using these waiting times, and because the enqueuer worker runs every hour, sometimes we run into a situation where the next migration is skipped just because of a few seconds (the worker will wait for at least Xh since the last completed migration to process the next one).

What does this MR do and why?

Reduces the default waiting time from 1h to 45m and the slow waiting time from 6h to 2h45m.

How to set up and validate locally

In the Rails console:

[1] pry(main)> ContainerRegistry::Migration.enqueue_waiting_time
=> 45 minutes
[2] pry(main)> Feature.enable(:container_registry_migration_phase2_enqueue_speed_slow)
=> true
[3] pry(main)> ContainerRegistry::Migration.enqueue_waiting_time
=> 165 minutes

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by João Pereira

Merge request reports