gitlab-org--gitlab-foss/lib/gitlab/database
Yorick Peterse 7f30bb9c29
Run background migrations with a minimum interval
This adds a minimum interval to BackgroundMigrationWorker, ensuring
background migrations of the same class only run once every 5 minutes.
This prevents a thundering herd problem where scheduled migrations all
run at once due to their delays having been expired (e.g. as the result
of a queue being paused for a long time).

If a job was recently executed it's rescheduled with a delay that equals
the remaining time of the job's lease. This means that if the lease
expires in two minutes we only need to wait two minutes, instead of
five.

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/41624
2018-01-05 16:23:25 +01:00
..
rename_reserved_paths_migration Merge remote-tracking branch 'upstream/master' into no-ivar-in-modules 2017-11-22 17:07:01 +08:00
date_time.rb
grant.rb Fix TRIGGER checks for MySQL 2017-11-06 23:34:07 +01:00
median.rb
migration_helpers.rb Run background migrations with a minimum interval 2018-01-05 16:23:25 +01:00
multi_threaded_migration.rb
read_only_relation.rb Fix setting share_with_group_lock 2017-09-15 17:38:46 +02:00
sha_attribute.rb