Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-07-20 09:08:37 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-07-20 09:08:37 +0300
commit1ad2f1981f05721d92d04c490cfc0f234737fec1 (patch)
tree2f7cb8bff250153f12d6db1a35a17eed81589b25 /doc/development/background_migrations.md
parent93c966ae2abeb481cfa894351b74f954e406582d (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/development/background_migrations.md')
-rw-r--r--doc/development/background_migrations.md19
1 files changed, 12 insertions, 7 deletions
diff --git a/doc/development/background_migrations.md b/doc/development/background_migrations.md
index 534621caf8f..4e91c4a0e25 100644
--- a/doc/development/background_migrations.md
+++ b/doc/development/background_migrations.md
@@ -174,13 +174,18 @@ roughly be as follows:
1. Release B:
1. Deploy code so that the application starts using the new column and stops
scheduling jobs for newly created data.
- 1. In a post-deployment migration you'll need to ensure no jobs remain.
- 1. Use `Gitlab::BackgroundMigration.steal` to process any remaining
- jobs in Sidekiq.
- 1. Reschedule the migration to be run directly (i.e. not through Sidekiq)
- on any rows that weren't migrated by Sidekiq. This can happen if, for
- instance, Sidekiq received a SIGKILL, or if a particular batch failed
- enough times to be marked as dead.
+ 1. In a post-deployment migration use `finalize_background_migration` from
+ `BackgroundMigrationHelpers` to ensure no jobs remain. This helper will:
+ 1. Use `Gitlab::BackgroundMigration.steal` to process any remaining
+ jobs in Sidekiq.
+ 1. Reschedule the migration to be run directly (i.e. not through Sidekiq)
+ on any rows that weren't migrated by Sidekiq. This can happen if, for
+ instance, Sidekiq received a SIGKILL, or if a particular batch failed
+ enough times to be marked as dead.
+ 1. Remove `Gitlab::Database::BackgroundMigrationJob` rows where
+ `status = succeeded`. To retain diagnostic information that may
+ help with future bug tracking you can skip this step by specifying
+ the `delete_tracking_jobs: false` parameter.
1. Remove the old column.
This may also require a bump to the [import/export version](../user/project/settings/import_export.md), if