Fix lock retries for the partition helper
What does this MR do and why?
Fixes:
[1] pry(#<Gitlab::Database::Partitioning::ConvertTableToFirstListPartition>)> rails aborted!
StandardError: An error has occurred, all later migrations canceled:
unknown keyword: :raise_on_exhaustion
/Users/marius/Workspace/gitlab-development-kit/gitlab/lib/gitlab/database/schema_helpers.rb:74:in `with_lock_retries'
/Users/marius/Workspace/gitlab-development-kit/gitlab/lib/gitlab/database/partitioning/convert_table_to_first_list_partition.rb:161:in `block in attach_foreign_keys_to_parent'
/Users/marius/Workspace/gitlab-development-kit/gitlab/lib/gitlab/database/partitioning/convert_table_to_first_list_partition.rb:149:in `each'
/Users/marius/Workspace/gitlab-development-kit/gitlab/lib/gitlab/database/partitioning/convert_table_to_first_list_partition.rb:149:in `attach_foreign_keys_to_parent'
/Users/marius/Workspace/gitlab-development-kit/gitlab/lib/gitlab/database/partitioning/convert_table_to_first_list_partition.rb:38:in `partition'
/Users/marius/Workspace/gitlab-development-kit/gitlab/lib/gitlab/database/partitioning_migration_helpers/table_management_helpers.rb:287:in `convert_table_to_first_list_partition'
/Users/marius/Workspace/gitlab-development-kit/gitlab/db/post_migrate/20221004074914_create_routing_table_for_builds_metadata.rb:21:in `up'
/Users/marius/Workspace/gitlab-development-kit/gitlab/lib/gitlab/database/migration_helpers/restrict_gitlab_schema.rb:33:in `block in exec_migration'
/Users/marius/Workspace/gitlab-development-kit/gitlab/lib/gitlab/database/query_analyzer.rb:37:in `within'
/Users/marius/Workspace/gitlab-development-kit/gitlab/lib/gitlab/database/migration_helpers/restrict_gitlab_schema.rb:30:in `exec_migration'
/Users/marius/Workspace/gitlab-development-kit/gitlab/lib/gitlab/database/migrations/lock_retry_mixin.rb:36:in `ddl_transaction'
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Marius Bobin