summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2018-04-18 12:27:35 +0000
committerSean McGivern <sean@mcgivern.me.uk>2018-04-18 12:27:35 +0000
commit08b1bff79a6ac91cdf18b5add3ee68e185f5d2fd (patch)
treed022bf44061581868264b61a02c41c19790d7434
parent9c2f6e04cf5d2eb89d0ec68e8ace87b3804e9ae5 (diff)
parent3772310423ce84b9ec6f1c1b29c0ad2e2d234efe (diff)
downloadgitlab-ce-08b1bff79a6ac91cdf18b5add3ee68e185f5d2fd.tar.gz
Merge branch 'improve-cleanup-steps-for-background-migrations' into 'master'
Add more detail to cleanup steps for background migrations See merge request gitlab-org/gitlab-ce!18448
-rw-r--r--doc/development/background_migrations.md15
1 files changed, 12 insertions, 3 deletions
diff --git a/doc/development/background_migrations.md b/doc/development/background_migrations.md
index fc1b202b5eb..ce69694ab6a 100644
--- a/doc/development/background_migrations.md
+++ b/doc/development/background_migrations.md
@@ -133,11 +133,19 @@ 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. To do
- so you can use `Gitlab::BackgroundMigration.steal` to process any remaining
- jobs before continuing.
+ 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. Remove the old column.
+This may also require a bump to the [import/export version][import-export], if
+importing a project from a prior version of GitLab requires the data to be in
+the new format.
+
## Example
To explain all this, let's use the following example: the table `services` has a
@@ -296,3 +304,4 @@ for more details.
[migrations-readme]: https://gitlab.com/gitlab-org/gitlab-ce/blob/master/spec/migrations/README.md
[issue-rspec-hooks]: https://gitlab.com/gitlab-org/gitlab-ce/issues/35351
[reliable-sidekiq]: https://gitlab.com/gitlab-org/gitlab-ce/issues/36791
+[import-export]: ../user/project/settings/import_export.md