Skip to content

Disable statement timeout in RenameLoginRootNamespaces migration

Felipe Cardozo requested to merge issue_50980 into master

What does this MR do?

Disable statement timeout for RenameLoginRootNamespaces migration
closes #50980 (closed)

Migration output

UP

[5] pry(main)> RenameLoginRootNamespaces.new.up
-- execute("SET statement_timeout TO 0")
   (0.7ms)  SET statement_timeout TO 0
  ↳ lib/gitlab/database/migration_helpers.rb:252
   -> 0.0020s
  Namespace Load (8.9ms)  SELECT "namespaces".* FROM "namespaces" INNER JOIN "routes" ON "routes"."source_id" = "namespaces"."id" AND "routes"."source_type" = $1 WHERE "namespaces"."parent_id" IS NULL AND ("routes"."path" ILIKE '%/login' OR "routes"."path" ILIKE 'login')  [["source_type", "Namespace"]]
  ↳ lib/gitlab/database/rename_reserved_paths_migration/v1/rename_namespaces.rb:9
-- execute("RESET ALL")
   (0.1ms)  RESET ALL
  ↳ lib/gitlab/database/migration_helpers.rb:256
   -> 0.0003s
=> []

Down

[4] pry(main)> RenameLoginRootNamespaces.new.down
-- execute("SET statement_timeout TO 0")
   (0.9ms)  SET statement_timeout TO 0
  ↳ lib/gitlab/database/migration_helpers.rb:252
   -> 0.0025s
-- execute("RESET ALL")
   (0.6ms)  RESET ALL
  ↳ lib/gitlab/database/migration_helpers.rb:256
   -> 0.0019s
=> []
Edited by Felipe Cardozo

Merge request reports

Loading