summaryrefslogtreecommitdiff
path: root/app/workers/background_migration_worker.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add latest changes from gitlab-org/gitlab@14-8-stable-eev14.8.0-rc42GitLab Bot2022-02-181-4/+0
|
* Add latest changes from gitlab-org/gitlab@14-6-stable-eev14.6.0-rc42GitLab Bot2021-12-201-112/+5
|
* Add latest changes from gitlab-org/gitlab@14-3-stable-eev14.3.0-rc42GitLab Bot2021-09-201-8/+15
|
* Add latest changes from gitlab-org/gitlab@14-2-stable-eev14.2.0-rc42GitLab Bot2021-08-191-0/+2
|
* Add latest changes from gitlab-org/gitlab@13-12-stable-eev13.12.0-rc42GitLab Bot2021-05-191-0/+2
|
* Add latest changes from gitlab-org/gitlab@13-6-stable-eev13.6.0-rc42GitLab Bot2020-11-191-22/+35
|
* Add latest changes from gitlab-org/gitlab@13-5-stable-eev13.5.0-rc42GitLab Bot2020-10-211-1/+3
|
* Add latest changes from gitlab-org/gitlab@13-1-stable-eeGitLab Bot2020-06-181-0/+1
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-04-151-0/+1
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-03-241-1/+1
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-02-191-11/+13
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2019-10-181-0/+2
|
* Further remove code branches by database typeAndreas Brandl2019-07-291-2/+0
| | | | | | | | We dropped MySQL support and a lot of mysql specific code has been removed in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/29608. This comes in from the other direction and removes any `if postgresql?` branches.
* Remove feature flag from BackgroundMigrationWorkerYorick Peterse2018-08-281-13/+1
| | | | | | The feature has been running on GitLab.com for a while now, without any problems. This commit removes the eature flag, and enables the feature for all users.
* Respond to DB health in background migrationsYorick Peterse2018-08-061-7/+54
| | | | | | | | | | | | | | | | | | | This changes the BackgroundMigration worker so it checks for the health of the DB before performing a background migration. This in turn allows us to reduce the minimum interval, without having to worry about blowing things up if we schedule too many migrations. In this setup, the BackgroundMigration worker will reschedule jobs as long as the database is considered to be in an unhealthy state. Once the database has recovered, the migration can be performed. To determine if the database is in a healthy state, we look at the replication lag of any replication slots defined on the primary. If the lag is deemed to great (100 MB by default) for too many slots, the migration is rescheduled for a later point in time. The health checking code is hidden behind a feature flag, allowing us to disable it if necessary.
* Enable frozen string literals for app/workers/*.rbgfyoung2018-06-271-0/+2
|
* Run background migrations with a minimum intervaldelay-background-migrationsYorick Peterse2018-01-051-1/+44
| | | | | | | | | | | | | | | 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
* Consistently schedule Sidekiq jobsdm-application-workerDouwe Maan2017-12-051-28/+0
|
* Add ApplicationWorker and make every worker include itDouwe Maan2017-12-051-2/+1
|
* Improve exception description in bg migrationsGrzegorz Bizon2017-07-071-1/+3
|
* Add description to exception in bg migrations workerGrzegorz Bizon2017-07-071-1/+1
|
* Use integers to schedule delayed background migrationsGrzegorz Bizon2017-07-071-2/+2
|
* Use ActiveRecord 5 batching to schedule bg migrationGrzegorz Bizon2017-07-071-1/+1
|
* Make it possible to schedule bg migrations in bulkGrzegorz Bizon2017-07-071-2/+16
|
* Add the ability to perform background migrationsYorick Peterse2017-06-121-0/+23
Background migrations can be used to perform long running data migrations without these blocking a deployment procedure. See MR https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/11854 for more information.