Skip to content
Snippets Groups Projects

Cleanup unused tagging records

Merged Heinrich Lee Yu requested to merge 335794-cleanup-old-taggings into master
All threads resolved!

What does this MR do and why?

Deletes unused records from the database. These are not used since we moved to labels 7 years ago: d45a6b29

This deletes 53855 issue taggings and 125 merge request taggings.

Migration output

== 20211028100303 TmpIndexForDeleteIssueMergeRequestTaggingsRecords: migrating
-- transaction_open?()
   -> 0.0000s
-- index_exists?(:taggings, :id, {:where=>"taggable_type IN ('Issue', 'MergeRequest')", :name=>"tmp_index_taggings_on_id_where_taggable_type_issue_mr", :algorithm=>:concurrently})
   -> 0.0043s
-- add_index(:taggings, :id, {:where=>"taggable_type IN ('Issue', 'MergeRequest')", :name=>"tmp_index_taggings_on_id_where_taggable_type_issue_mr", :algorithm=>:concurrently})
   -> 0.0101s
== 20211028100303 TmpIndexForDeleteIssueMergeRequestTaggingsRecords: migrated (0.0223s)

== 20211028100843 DeleteIssueMergeRequestTaggingsRecords: migrating ===========
-- transaction_open?()
   -> 0.0000s
-- indexes(:taggings)
   -> 0.0041s
-- remove_index(:taggings, {:algorithm=>:concurrently, :name=>"tmp_index_taggings_on_id_where_taggable_type_issue_mr"})
   -> 0.0043s
== 20211028100843 DeleteIssueMergeRequestTaggingsRecords: migrated (0.0258s) ==
== 20211028100843 DeleteIssueMergeRequestTaggingsRecords: reverting ===========
== 20211028100843 DeleteIssueMergeRequestTaggingsRecords: reverted (0.0000s) ==

== 20211028100303 TmpIndexForDeleteIssueMergeRequestTaggingsRecords: reverting
-- transaction_open?()
   -> 0.0000s
-- indexes(:taggings)
   -> 0.0034s
-- current_schema()
   -> 0.0003s
== 20211028100303 TmpIndexForDeleteIssueMergeRequestTaggingsRecords: reverted (0.0063s)

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #335794 (closed)

Edited by Heinrich Lee Yu

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Heinrich Lee Yu changed the description

    changed the description

  • Author Maintainer

    @DylanGriffith can you review please?

  • requested review from @DylanGriffith

  • Heinrich Lee Yu added 180 commits

    added 180 commits

    Compare with previous version

  • added 1 commit

    • 86c9ec5e - Delete records without temp index

    Compare with previous version

  • Heinrich Lee Yu added 17 commits

    added 17 commits

    Compare with previous version

  • Dylan Griffith requested review from @sabrams

    requested review from @sabrams

  • Steve Abrams approved this merge request

    approved this merge request

  • added databaseapproved label and removed databasereviewed label

  • :wave: @sabrams, thanks for approving this merge request.

    This is the first time the merge request is approved. To ensure full test coverage, a new pipeline has been started.

    For more info, please refer to the following links:

  • Steve Abrams resolved all threads

    resolved all threads

  • Steve Abrams enabled an automatic merge when the pipeline for 816611ae succeeds

    enabled an automatic merge when the pipeline for 816611ae succeeds

  • merged

  • Steve Abrams mentioned in commit 01ef8c75

    mentioned in commit 01ef8c75

  • added workflowcanary label and removed workflowstaging label

  • added workflowproduction label and removed workflowcanary label

  • Please register or sign in to reply
    Loading