Skip to content

Remove index index_vulnerabilities_on_detected_at_and_id

  • Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA

What does this MR do and why?

This MR is to remove the index_vulnerabilities_on_detected_at_and_id asynchronously from the vulnerabilities table

Related to issue: #417265

Migration Logs

❯ bundle exec rails db:migrate
main: == [advisory_lock_connection] object_id: 124120, pg_backend_pid: 80770
main: == 20240423035625 PrepareAsyncIndexRemovalForVulnerabilities: migrating =======
main: -- index_exists?(:vulnerabilities, [:detected_at, :id], {:name=>"index_vulnerabilities_on_detected_at_and_id"})
main:    -> 0.0216s
main: == 20240423035625 PrepareAsyncIndexRemovalForVulnerabilities: migrated (0.0241s)

main: == [advisory_lock_connection] object_id: 124120, pg_backend_pid: 80770
ci: == [advisory_lock_connection] object_id: 124340, pg_backend_pid: 80772
ci: == 20240423035625 PrepareAsyncIndexRemovalForVulnerabilities: migrating =======
ci: -- index_exists?(:vulnerabilities, [:detected_at, :id], {:name=>"index_vulnerabilities_on_detected_at_and_id"})
ci:    -> 0.0083s
ci: == 20240423035625 PrepareAsyncIndexRemovalForVulnerabilities: migrated (0.0136s)

ci: == [advisory_lock_connection] object_id: 124340, pg_backend_pid: 80772
Both Import::SourceUser and its :status machine have defined a different default for "status". Use only one or the other for defining defaults to avoid unexpected behaviors.
Edited by Justin Zeng

Merge request reports