diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2024-01-16 13:42:19 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2024-01-16 13:42:19 +0300 |
commit | 84d1bd786125c1c14a3ba5f63e38a4cc736a9027 (patch) | |
tree | f550fa965f507077e20dbb6d61a8269a99ef7107 /db/post_migrate/20240105144908_queue_backfill_issue_search_data_namespace_id.rb | |
parent | 3a105e36e689f7b75482236712f1a47fd5a76814 (diff) |
Add latest changes from gitlab-org/gitlab@16-8-stable-eev16.8.0-rc42
Diffstat (limited to 'db/post_migrate/20240105144908_queue_backfill_issue_search_data_namespace_id.rb')
-rw-r--r-- | db/post_migrate/20240105144908_queue_backfill_issue_search_data_namespace_id.rb | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/db/post_migrate/20240105144908_queue_backfill_issue_search_data_namespace_id.rb b/db/post_migrate/20240105144908_queue_backfill_issue_search_data_namespace_id.rb new file mode 100644 index 00000000000..f12041e613f --- /dev/null +++ b/db/post_migrate/20240105144908_queue_backfill_issue_search_data_namespace_id.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true + +class QueueBackfillIssueSearchDataNamespaceId < Gitlab::Database::Migration[2.2] + milestone '16.8' + + MIGRATION = "BackfillIssueSearchDataNamespaceId" + DELAY_INTERVAL = 2.minutes + BATCH_SIZE = 10_000 + SUB_BATCH_SIZE = 1_000 + + restrict_gitlab_migration gitlab_schema: :gitlab_main + + def up + queue_batched_background_migration( + MIGRATION, + :issues, + :id, + job_interval: DELAY_INTERVAL, + batch_size: BATCH_SIZE, + sub_batch_size: SUB_BATCH_SIZE + ) + end + + def down + delete_batched_background_migration(MIGRATION, :issues, :id, []) + end +end |