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
path: root/db
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-05-18 00:08:51 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-05-18 00:08:51 +0300
commit9613d93025008a5326ddb624e2909feaa87e7977 (patch)
tree0a48921271f5ad0a31433626325f54b691d10fd6 /db
parent6f05d35c3160e3a442b40d6af1e8e584747080b3 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r--db/post_migrate/20220502173045_reset_too_many_tags_skipped_registry_imports.rb27
-rw-r--r--db/schema_migrations/202205021730451
2 files changed, 28 insertions, 0 deletions
diff --git a/db/post_migrate/20220502173045_reset_too_many_tags_skipped_registry_imports.rb b/db/post_migrate/20220502173045_reset_too_many_tags_skipped_registry_imports.rb
new file mode 100644
index 00000000000..e327035d6c9
--- /dev/null
+++ b/db/post_migrate/20220502173045_reset_too_many_tags_skipped_registry_imports.rb
@@ -0,0 +1,27 @@
+# frozen_string_literal: true
+
+class ResetTooManyTagsSkippedRegistryImports < Gitlab::Database::Migration[2.0]
+ MIGRATION = 'ResetTooManyTagsSkippedRegistryImports'
+ DELAY_INTERVAL = 2.minutes.to_i
+ BATCH_SIZE = 10_000
+
+ disable_ddl_transaction!
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+
+ def up
+ queue_background_migration_jobs_by_range_at_intervals(
+ define_batchable_model('container_repositories').where(
+ migration_state: 'import_skipped',
+ migration_skipped_reason: 2
+ ),
+ MIGRATION,
+ DELAY_INTERVAL,
+ batch_size: BATCH_SIZE,
+ track_jobs: true
+ )
+ end
+
+ def down
+ # no-op
+ end
+end
diff --git a/db/schema_migrations/20220502173045 b/db/schema_migrations/20220502173045
new file mode 100644
index 00000000000..d17f403df8d
--- /dev/null
+++ b/db/schema_migrations/20220502173045
@@ -0,0 +1 @@
+893f211ebd0dceae4e375e644ed6213a066fe8b5985f226f5f256651fdd4b483 \ No newline at end of file