diff options
Diffstat (limited to 'doc/update/background_migrations.md')
-rw-r--r-- | doc/update/background_migrations.md | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/doc/update/background_migrations.md b/doc/update/background_migrations.md index c5ffefdd77f..1f9ef9d430b 100644 --- a/doc/update/background_migrations.md +++ b/doc/update/background_migrations.md @@ -78,7 +78,7 @@ sudo -u git -H bundle exec rails runner -e production 'puts Gitlab::Database::Ba > - [Enabled by default](https://gitlab.com/gitlab-org/gitlab/-/issues/329511) in GitLab 13.12. > - Enabled on GitLab.com. > - Recommended for production use. -> - For GitLab self-managed instances, GitLab administrators can opt to [disable it](#enable-or-disable-batched-background-migrations). +> - For GitLab self-managed instances, GitLab administrators can opt to [disable it](#enable-or-disable-background-migrations). There can be [risks when disabling released features](../administration/feature_flags.md#risks-when-disabling-released-features). Refer to this feature's version history for more details. @@ -203,17 +203,21 @@ Feature.disable(:optimize_batched_migrations) ## Troubleshooting -### Enable or disable batched background migrations +### Enable or disable background migrations -In extremely limited circumstances, a GitLab administrator can disable the -`execute_batched_migrations_on_schedule` [feature flag](../administration/feature_flags.md). -This flag is enabled by default, and should be disabled only as a last resort +In extremely limited circumstances, a GitLab administrator can disable either or +both of these [feature flags](../administration/feature_flags.md): + +- `execute_background_migrations` +- `execute_batched_migrations_on_schedule` + +These flags are enabled by default. Disable them only as a last resort to limit database operations in special circumstances, like database host maintenance. WARNING: -Do not disable this flag unless you fully understand the ramifications. If you disable -the `execute_batched_migrations_on_schedule` feature flag, GitLab upgrades may fail -and data loss may occur. +Do not disable either of these flags unless you fully understand the ramifications. If you disable +the `execute_background_migrations` or `execute_batched_migrations_on_schedule` feature flag, +GitLab upgrades might fail and data loss might occur. ### Database migrations failing because of batched background migration not finished @@ -271,7 +275,7 @@ arguments until the status query returns no rows. ##### For a no-downtime deployment As the failing migrations are post-deployment migrations, you can remain on a running instance of the upgraded -version and wait for the batched background migrations to finish normally. +version and wait for the batched background migrations to finish. 1. [Check the status](#check-the-status-of-batched-background-migrations) of the batched background migration from the error message, and make sure it is listed as finished. If it is still active, either wait until it is done, |