Geo: Part 3 of Enforce not null merge_request_diffs.external_diff_store
What does this MR do?
Part 1: !38549 (merged)
Part 2: !38719 (merged)
This MR is the last part needed to enforce not null external_diff_store on merge_request_diffs. This improves the performance of queries for locally stored MR diffs since we no longer have to look for 1
and also NULL
values.
Part of #235516 (closed)
Migration output
Up:
== 20200910170908 EnsureFilledExternalDiffStoreOnMergeRequestDiffs: migrating =
== 20200910170908 EnsureFilledExternalDiffStoreOnMergeRequestDiffs: migrated (0.0127s)
== 20200910175553 ValidateNotNullExternalDiffStoreOnMergeRequestDiffs: migrating
-- execute("ALTER TABLE merge_request_diffs VALIDATE CONSTRAINT check_93ee616ac9;")
-> 0.0002s
-- transaction_open?()
-> 0.0000s
-- indexes(:merge_request_diffs)
-> 0.0029s
-- remove_index(:merge_request_diffs, {:algorithm=>:concurrently, :name=>"index_merge_request_diffs_external_diff_store_is_null"})
-> 0.0053s
== 20200910175553 ValidateNotNullExternalDiffStoreOnMergeRequestDiffs: migrated (0.0097s)
Down:
== 20200910175553 ValidateNotNullExternalDiffStoreOnMergeRequestDiffs: reverting
-- transaction_open?()
-> 0.0000s
-- index_exists?(:merge_request_diffs, :id, {:where=>"external_diff_store IS NULL", :name=>"index_merge_request_diffs_external_diff_store_is_null", :algorithm=>:concurrently})
-> 0.0037s
-- add_index(:merge_request_diffs, :id, {:where=>"external_diff_store IS NULL", :name=>"index_merge_request_diffs_external_diff_store_is_null", :algorithm=>:concurrently})
-> 0.0121s
== 20200910175553 ValidateNotNullExternalDiffStoreOnMergeRequestDiffs: reverted (0.0162s)
== 20200910170908 EnsureFilledExternalDiffStoreOnMergeRequestDiffs: reverting =
== 20200910170908 EnsureFilledExternalDiffStoreOnMergeRequestDiffs: reverted (0.0000s)
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.
Edited by Michael Kozono