Skip to content

Update task system note background migration batch sizes

Mario Celi requested to merge 369930-update-batched-migration-batch-sizes into master

What does this MR do and why?

We saw that some environments might fail to run the RenameTaskSystemNoteToChecklistItem migration because sub batch sizes were too big. This migration updates batch sizes to safer values and also retries the migration in environments where it might have failed.

This migration already run successfully in .com and was manually fixed in staging. So both environments won't be affected by this migration.

Since this might fix the problem in some self hosted environments, we would still need to wait for 15.6 to create a migration using ensure_batched_background_migration_is_finished

Migration Output

UP

bin/rails db:migrate
main: == 20221006172302 AdjustTaskNoteRenameBackgroundMigrationValues: migrating ====
main: == 20221006172302 AdjustTaskNoteRenameBackgroundMigrationValues: migrated (0.0215s)

ci: == 20221006172302 AdjustTaskNoteRenameBackgroundMigrationValues: migrating ====
ci: -- The migration is skipped since it modifies the schemas: [:gitlab_main].
ci: -- This database can only apply migrations in one of the following schemas: [:gitlab_ci, :gitlab_shared, :gitlab_internal].
ci: == 20221006172302 AdjustTaskNoteRenameBackgroundMigrationValues: migrated (0.0001s)

DOWN

bin/rails db:rollback:main
main: == 20221006172302 AdjustTaskNoteRenameBackgroundMigrationValues: reverting ====
main: == 20221006172302 AdjustTaskNoteRenameBackgroundMigrationValues: reverted (0.0403s)

bin/rails db:rollback:ci
ci: == 20221006172302 AdjustTaskNoteRenameBackgroundMigrationValues: reverting ====
ci: -- The migration is skipped since it modifies the schemas: [:gitlab_main].
ci: -- This database can only apply migrations in one of the following schemas: [:gitlab_ci, :gitlab_shared, :gitlab_internal].
ci: == 20221006172302 AdjustTaskNoteRenameBackgroundMigrationValues: reverted (0.0001s)

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #369930 (closed)

Edited by Mario Celi

Merge request reports

Loading