summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2018-01-04 15:57:45 +0000
committerDouwe Maan <douwe@gitlab.com>2018-01-04 15:57:45 +0000
commitd2891822e708f91c92b3a45bbbb78831b424e59a (patch)
tree88bfde58794b13c638498c5c67eb8d9b49e344d9 /db
parent1e950e3148d31cb3b242cb21be11e04964c2a037 (diff)
parentf635277228c4ac90bd7215db741392df1998ddfc (diff)
downloadgitlab-ce-d2891822e708f91c92b3a45bbbb78831b424e59a.tar.gz
Merge branch 'mk-no-op-delete-conflicting-redirects' into 'master'
Prevent excessive DB load due to faulty DeleteConflictingRedirectRoutes background migration See merge request gitlab-org/gitlab-ce!16205
Diffstat (limited to 'db')
-rw-r--r--db/post_migrate/20170907170235_delete_conflicting_redirect_routes.rb28
1 files changed, 2 insertions, 26 deletions
diff --git a/db/post_migrate/20170907170235_delete_conflicting_redirect_routes.rb b/db/post_migrate/20170907170235_delete_conflicting_redirect_routes.rb
index 3e84b295be4..033019c398e 100644
--- a/db/post_migrate/20170907170235_delete_conflicting_redirect_routes.rb
+++ b/db/post_migrate/20170907170235_delete_conflicting_redirect_routes.rb
@@ -2,36 +2,12 @@
# for more information on how to write migrations for GitLab.
class DeleteConflictingRedirectRoutes < ActiveRecord::Migration
- include Gitlab::Database::MigrationHelpers
-
- DOWNTIME = false
- MIGRATION = 'DeleteConflictingRedirectRoutesRange'.freeze
- BATCH_SIZE = 200 # At 200, I expect under 20s per batch, which is under our query timeout of 60s.
- DELAY_INTERVAL = 12.seconds
-
- disable_ddl_transaction!
-
- class Route < ActiveRecord::Base
- include EachBatch
-
- self.table_name = 'routes'
- end
-
def up
- say opening_message
-
- queue_background_migration_jobs_by_range_at_intervals(Route, MIGRATION, DELAY_INTERVAL, batch_size: BATCH_SIZE)
+ # No-op.
+ # See https://gitlab.com/gitlab-com/infrastructure/issues/3460#note_53223252
end
def down
# nothing
end
-
- def opening_message
- <<~MSG
- Clean up redirect routes that conflict with regular routes.
- See initial bug fix:
- https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/13357
- MSG
- end
end