Remove non-unique index on MR metrics
What does this MR do?
This MR removes a redundant index from merge_request_metrics
table (merge_request_id
). After deduplicating the table, a unique index was created to support the merge_request_id
column (!29566 (merged)).
- Index to remove:
"index_merge_request_metrics" btree (merge_request_id)
- Index to keep (new):
"unique_merge_request_metrics_by_merge_request_id" UNIQUE, btree (merge_request_id)
Migrations
up:
== 20200707071941 DropOldNonUniqueIndexOnMrMetrics: migrating =================
-- transaction_open?()
-> 0.0000s
-- indexes(:merge_request_metrics)
-> 0.0033s
-- remove_index(:merge_request_metrics, {:algorithm=>:concurrently, :name=>"index_merge_request_metrics"})
-> 0.0016s
== 20200707071941 DropOldNonUniqueIndexOnMrMetrics: migrated (0.0052s) ========
down:
== 20200707071941 DropOldNonUniqueIndexOnMrMetrics: reverting =================
-- transaction_open?()
-> 0.0000s
-- index_exists?(:merge_request_metrics, :merge_request_id, {:name=>"index_merge_request_metrics", :algorithm=>:concurrently})
-> 0.0032s
-- add_index(:merge_request_metrics, :merge_request_id, {:name=>"index_merge_request_metrics", :algorithm=>:concurrently})
-> 0.0125s
== 20200707071941 DropOldNonUniqueIndexOnMrMetrics: reverted (0.0160s) ========
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry - [-] Documentation (if required)
-
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides - [-] Separation of EE specific content
Availability and Testing
- [-] Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process.
- [-] Tested in all supported browsers
- [-] Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
- [-] Label as security and @ mention
@gitlab-com/gl-security/appsec
- [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
- [-] Security reports checked/validated by a reviewer from the AppSec team
Merge request reports
Activity
changed milestone to %13.2
added database databasereview pending labels
Reviewer roulette
Changes that require review have been detected! A merge request is normally reviewed by both a reviewer and a maintainer in its primary category (e.g. frontend or backend), and by a maintainer in all other categories.
To spread load more evenly across eligible reviewers, Danger has picked a candidate for each review slot, based on their timezone. Feel free to override these selections if you think someone else would be better-suited, or the chosen person is unavailable.
To read more on how to use the reviewer roulette, please take a look at the Engineering workflow and code review guidelines. Please consider assigning a reviewer or maintainer who is a domain expert in the area of the merge request.
Once you've decided who will review this merge request, mention them as you normally would! Danger does not automatically notify them for you.
Category Reviewer Maintainer database Allison Browne ( @allison.browne
) (UTC-5, 7 hours behind@ahegyi
)Mayra Cabrera ( @mayra-cabrera
) (UTC-5, 7 hours behind@ahegyi
)If needed, you can retry the
danger-review
job that generated this comment.Generated by
DangerEdited by 🤖 GitLab Bot 🤖added typefeature label
added backstage [DEPRECATED] label and removed typefeature label
added 66 commits
-
8aee1d26...c0d64fc8 - 65 commits from branch
master
- fb03ff3a - Remove non-unique index on MR metrics
-
8aee1d26...c0d64fc8 - 65 commits from branch
marked the checklist item Changelog entry as completed
Hi @nmilojevic1,
Can you do the DB review?
assigned to @nmilojevic1
added 23 commits
-
fb03ff3a...1e691756 - 22 commits from branch
master
- 7c510720 - Remove non-unique index on MR metrics
-
fb03ff3a...1e691756 - 22 commits from branch
LGTM
@mayra-cabrera can you please do the maintainer review.assigned to @mayra-cabrera
added databasereviewed label and removed databasereview pending label
unassigned @nmilojevic1
enabled an automatic merge when the pipeline for 98a2e355 succeeds
added databaseapproved label and removed databasereviewed label
Thanks @ahegyi! This LGTM, MWPS set
mentioned in commit 339932cb
added workflowstaging label
added workflowcanary label and removed workflowstaging label
added workflowproduction label and removed workflowcanary label