From 7f30bb9c29bc1ff0c903a16bbf678db31c7408ec Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Thu, 4 Jan 2018 16:49:15 +0100 Subject: 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 --- changelogs/unreleased/delay-background-migrations.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 changelogs/unreleased/delay-background-migrations.yml (limited to 'changelogs') diff --git a/changelogs/unreleased/delay-background-migrations.yml b/changelogs/unreleased/delay-background-migrations.yml new file mode 100644 index 00000000000..aa12591e7d2 --- /dev/null +++ b/changelogs/unreleased/delay-background-migrations.yml @@ -0,0 +1,5 @@ +--- +title: Run background migrations with a minimum interval +merge_request: +author: +type: changed -- cgit v1.2.1