Resolve "Address the Primary Key Overflow risk for the taggings table - Step 2: Finalize background migrations and swap columns"
What does this MR do?
This MR finalize the conversion to bigint
for taggings
table.
At a high level, the operation takes the following steps:
- Ensure the migration of
id
tobigint
is completed. - Ensure the migration of
taggable_id
tobigint
is completed. - Copy index
- Swap columns, drop existing PK, define new PK, swap sequences
Cleanup (removing the old int
columns and the triggers) will be done in later MR.
Migration Output
Up
== 20210806131706 FinalizeTagginsBigintConversion: migrating ================== -- transaction_open?() -> 0.0000s -- index_exists?("taggings", :id_convert_to_bigint, {:unique=>true, :name=>"index_taggings_on_id_convert_to_bigint", :algorithm=>:concurrently}) -> 0.0041s -- transaction_open?() -> 0.0000s -- index_exists?("taggings", [:taggable_id_convert_to_bigint, :taggable_type], {:name=>"i_taggings_on_taggable_id_convert_to_bigint_and_taggable_type", :algorithm=>:concurrently}) -> 0.0036s -- transaction_open?() -> 0.0000s -- index_exists?("taggings", [:taggable_id_convert_to_bigint, :taggable_type, :context], {:name=>"i_taggings_on_taggable_bigint_and_taggable_type_and_context", :algorithm=>:concurrently}) -> 0.0030s -- transaction_open?() -> 0.0000s -- index_exists?("taggings", [:tag_id, :taggable_id_convert_to_bigint, :taggable_type, :context, :tagger_id, :tagger_type], {:unique=>true, :name=>"taggings_idx_tmp", :algorithm=>:concurrently}) -> 0.0027s -- transaction_open?() -> 0.0000s -- index_exists?("taggings", :id_convert_to_bigint, {:where=>"taggable_type = 'Project'", :name=>"tmp_index_taggings_on_id_bigint_where_taggable_type_project", :algorithm=>:concurrently}) -> 0.0027s -- execute("SET statement_timeout TO 0") -> 0.0005s -- add_index("taggings", :id_convert_to_bigint, {:where=>"taggable_type = 'Project'", :name=>"tmp_index_taggings_on_id_bigint_where_taggable_type_project", :algorithm=>:concurrently}) -> 0.0029s -- execute("RESET statement_timeout") -> 0.0006s -- execute("LOCK TABLE taggings IN ACCESS EXCLUSIVE MODE") -> 0.0006s -- quote_table_name("taggings") -> 0.0000s -- quote_column_name(:taggable_id) -> 0.0000s -- quote_column_name("taggable_id_tmp") -> 0.0000s -- execute("ALTER TABLE \"taggings\" RENAME COLUMN \"taggable_id\" TO \"taggable_id_tmp\"") -> 0.0007s -- quote_table_name("taggings") -> 0.0000s -- quote_column_name(:taggable_id_convert_to_bigint) -> 0.0000s -- quote_column_name(:taggable_id) -> 0.0000s -- execute("ALTER TABLE \"taggings\" RENAME COLUMN \"taggable_id_convert_to_bigint\" TO \"taggable_id\"") -> 0.0006s -- quote_table_name("taggings") -> 0.0000s -- quote_column_name("taggable_id_tmp") -> 0.0000s -- quote_column_name(:taggable_id_convert_to_bigint) -> 0.0000s -- execute("ALTER TABLE \"taggings\" RENAME COLUMN \"taggable_id_tmp\" TO \"taggable_id_convert_to_bigint\"") -> 0.0006s -- quote_table_name("taggings") -> 0.0000s -- quote_column_name(:id) -> 0.0000s -- quote_column_name("id_tmp") -> 0.0000s -- execute("ALTER TABLE \"taggings\" RENAME COLUMN \"id\" TO \"id_tmp\"") -> 0.0006s -- quote_table_name("taggings") -> 0.0000s -- quote_column_name(:id_convert_to_bigint) -> 0.0000s -- quote_column_name(:id) -> 0.0000s -- execute("ALTER TABLE \"taggings\" RENAME COLUMN \"id_convert_to_bigint\" TO \"id\"") -> 0.0006s -- quote_table_name("taggings") -> 0.0000s -- quote_column_name("id_tmp") -> 0.0000s -- quote_column_name(:id_convert_to_bigint) -> 0.0000s -- execute("ALTER TABLE \"taggings\" RENAME COLUMN \"id_tmp\" TO \"id_convert_to_bigint\"") -> 0.0006s -- quote_table_name("trigger_aebe8b822ad3") -> 0.0000s -- execute("ALTER FUNCTION \"trigger_aebe8b822ad3\" RESET ALL") -> 0.0007s -- execute("ALTER SEQUENCE taggings_id_seq OWNED BY taggings.id") -> 0.0015s -- change_column_default("taggings", :id, #) -> 0.0029s -- change_column_default("taggings", :id_convert_to_bigint, 0) -> 0.0017s -- execute("ALTER TABLE taggings DROP CONSTRAINT taggings_pkey CASCADE") -> 0.0012s -- rename_index("taggings", "index_taggings_on_id_convert_to_bigint", "taggings_pkey") -> 0.0007s -- execute("ALTER TABLE taggings ADD CONSTRAINT taggings_pkey PRIMARY KEY USING INDEX taggings_pkey") -> 0.0014s -- execute("DROP INDEX index_taggings_on_taggable_id_and_taggable_type") -> 0.0006s -- rename_index("taggings", "i_taggings_on_taggable_id_convert_to_bigint_and_taggable_type", "index_taggings_on_taggable_id_and_taggable_type") -> 0.0006s -- execute("DROP INDEX index_taggings_on_taggable_id_and_taggable_type_and_context") -> 0.0006s -- rename_index("taggings", "i_taggings_on_taggable_bigint_and_taggable_type_and_context", "index_taggings_on_taggable_id_and_taggable_type_and_context") -> 0.0006s -- execute("DROP INDEX taggings_idx") -> 0.0006s -- rename_index("taggings", "taggings_idx_tmp", "taggings_idx") -> 0.0006s -- execute("DROP INDEX tmp_index_taggings_on_id_where_taggable_type_project") -> 0.0006s -- rename_index("taggings", "tmp_index_taggings_on_id_bigint_where_taggable_type_project", "tmp_index_taggings_on_id_where_taggable_type_project") -> 0.0006s == 20210806131706 FinalizeTagginsBigintConversion: migrated (0.0940s) =========
Down
== 20210806131706 FinalizeTagginsBigintConversion: reverting ================== -- transaction_open?() -> 0.0000s -- index_exists?("taggings", :id_convert_to_bigint, {:unique=>true, :name=>"index_taggings_on_id_convert_to_bigint", :algorithm=>:concurrently}) -> 0.0034s -- execute("SET statement_timeout TO 0") -> 0.0005s -- add_index("taggings", :id_convert_to_bigint, {:unique=>true, :name=>"index_taggings_on_id_convert_to_bigint", :algorithm=>:concurrently}) -> 0.0029s -- execute("RESET statement_timeout") -> 0.0005s -- transaction_open?() -> 0.0000s -- index_exists?("taggings", [:taggable_id_convert_to_bigint, :taggable_type], {:name=>"i_taggings_on_taggable_id_convert_to_bigint_and_taggable_type", :algorithm=>:concurrently}) -> 0.0024s -- add_index("taggings", [:taggable_id_convert_to_bigint, :taggable_type], {:name=>"i_taggings_on_taggable_id_convert_to_bigint_and_taggable_type", :algorithm=>:concurrently}) -> 0.0019s -- transaction_open?() -> 0.0000s -- index_exists?("taggings", [:taggable_id_convert_to_bigint, :taggable_type, :context], {:name=>"i_taggings_on_taggable_bigint_and_taggable_type_and_context", :algorithm=>:concurrently}) -> 0.0024s -- add_index("taggings", [:taggable_id_convert_to_bigint, :taggable_type, :context], {:name=>"i_taggings_on_taggable_bigint_and_taggable_type_and_context", :algorithm=>:concurrently}) -> 0.0018s -- transaction_open?() -> 0.0000s -- index_exists?("taggings", [:tag_id, :taggable_id_convert_to_bigint, :taggable_type, :context, :tagger_id, :tagger_type], {:unique=>true, :name=>"taggings_idx_tmp", :algorithm=>:concurrently}) -> 0.0029s -- add_index("taggings", [:tag_id, :taggable_id_convert_to_bigint, :taggable_type, :context, :tagger_id, :tagger_type], {:unique=>true, :name=>"taggings_idx_tmp", :algorithm=>:concurrently}) -> 0.0019s -- transaction_open?() -> 0.0000s -- index_exists?("taggings", :id_convert_to_bigint, {:where=>"taggable_type = 'Project'", :name=>"tmp_index_taggings_on_id_bigint_where_taggable_type_project", :algorithm=>:concurrently}) -> 0.0030s -- add_index("taggings", :id_convert_to_bigint, {:where=>"taggable_type = 'Project'", :name=>"tmp_index_taggings_on_id_bigint_where_taggable_type_project", :algorithm=>:concurrently}) -> 0.0020s -- execute("LOCK TABLE taggings IN ACCESS EXCLUSIVE MODE") -> 0.0006s -- quote_table_name("taggings") -> 0.0000s -- quote_column_name(:taggable_id) -> 0.0000s -- quote_column_name("taggable_id_tmp") -> 0.0000s -- execute("ALTER TABLE \"taggings\" RENAME COLUMN \"taggable_id\" TO \"taggable_id_tmp\"") -> 0.0006s -- quote_table_name("taggings") -> 0.0000s -- quote_column_name(:taggable_id_convert_to_bigint) -> 0.0000s -- quote_column_name(:taggable_id) -> 0.0000s -- execute("ALTER TABLE \"taggings\" RENAME COLUMN \"taggable_id_convert_to_bigint\" TO \"taggable_id\"") -> 0.0006s -- quote_table_name("taggings") -> 0.0000s -- quote_column_name("taggable_id_tmp") -> 0.0000s -- quote_column_name(:taggable_id_convert_to_bigint) -> 0.0000s -- execute("ALTER TABLE \"taggings\" RENAME COLUMN \"taggable_id_tmp\" TO \"taggable_id_convert_to_bigint\"") -> 0.0005s -- quote_table_name("taggings") -> 0.0000s -- quote_column_name(:id) -> 0.0000s -- quote_column_name("id_tmp") -> 0.0000s -- execute("ALTER TABLE \"taggings\" RENAME COLUMN \"id\" TO \"id_tmp\"") -> 0.0006s -- quote_table_name("taggings") -> 0.0000s -- quote_column_name(:id_convert_to_bigint) -> 0.0000s -- quote_column_name(:id) -> 0.0000s -- execute("ALTER TABLE \"taggings\" RENAME COLUMN \"id_convert_to_bigint\" TO \"id\"") -> 0.0006s -- quote_table_name("taggings") -> 0.0000s -- quote_column_name("id_tmp") -> 0.0000s -- quote_column_name(:id_convert_to_bigint) -> 0.0000s -- execute("ALTER TABLE \"taggings\" RENAME COLUMN \"id_tmp\" TO \"id_convert_to_bigint\"") -> 0.0006s -- quote_table_name("trigger_aebe8b822ad3") -> 0.0000s -- execute("ALTER FUNCTION \"trigger_aebe8b822ad3\" RESET ALL") -> 0.0006s -- execute("ALTER SEQUENCE taggings_id_seq OWNED BY taggings.id") -> 0.0007s -- change_column_default("taggings", :id, #) -> 0.0021s -- change_column_default("taggings", :id_convert_to_bigint, 0) -> 0.0016s -- execute("ALTER TABLE taggings DROP CONSTRAINT taggings_pkey CASCADE") -> 0.0008s -- rename_index("taggings", "index_taggings_on_id_convert_to_bigint", "taggings_pkey") -> 0.0006s -- execute("ALTER TABLE taggings ADD CONSTRAINT taggings_pkey PRIMARY KEY USING INDEX taggings_pkey") -> 0.0009s -- execute("DROP INDEX index_taggings_on_taggable_id_and_taggable_type") -> 0.0006s -- rename_index("taggings", "i_taggings_on_taggable_id_convert_to_bigint_and_taggable_type", "index_taggings_on_taggable_id_and_taggable_type") -> 0.0006s -- execute("DROP INDEX index_taggings_on_taggable_id_and_taggable_type_and_context") -> 0.0006s -- rename_index("taggings", "i_taggings_on_taggable_bigint_and_taggable_type_and_context", "index_taggings_on_taggable_id_and_taggable_type_and_context") -> 0.0006s -- execute("DROP INDEX taggings_idx") -> 0.0006s -- rename_index("taggings", "taggings_idx_tmp", "taggings_idx") -> 0.0006s -- execute("DROP INDEX tmp_index_taggings_on_id_where_taggable_type_project") -> 0.0006s -- rename_index("taggings", "tmp_index_taggings_on_id_bigint_where_taggable_type_project", "tmp_index_taggings_on_id_where_taggable_type_project") -> 0.0005s == 20210806131706 FinalizeTagginsBigintConversion: reverted (0.0780s) =========
Database migrations
Timings
From DB Lab:
-
CREATE INDEX CONCURRENTLY "i_taggings_on_taggable_bigint_and_taggable_type_and_context" ON "taggings" ("taggable_id_convert_to_bigint", "taggable_type", "context");
Duration: 94.860 min - https://console.postgres.ai/gitlab/gitlab-production-tunnel-pg12/sessions/5353/commands/18774
-
CREATE INDEX CONCURRENTLY "i_taggings_on_taggable_id_convert_to_bigint_and_taggable_type" ON "taggings" ("taggable_id_convert_to_bigint", "taggable_type");
Duration: 58.935 min - https://console.postgres.ai/gitlab/gitlab-production-tunnel-pg12/sessions/5353/commands/18767
-
CREATE UNIQUE INDEX CONCURRENTLY "taggings_idx_tmp2" ON "taggings" ("tag_id", "taggable_id_convert_to_bigint", "taggable_type", "context", "tagger_id", "tagger_type");
Duration: 109.485 min - https://console.postgres.ai/gitlab/gitlab-production-tunnel-pg12/sessions/5353/commands/18803
-
CREATE UNIQUE INDEX CONCURRENTLY "index_taggings_on_id_convert_to_bigint" ON "taggings" ("id_convert_to_bigint");
Duration: 56.231 min - https://console.postgres.ai/gitlab/gitlab-production-tunnel-pg12/sessions/5353/commands/18843
-
CREATE INDEX CONCURRENTLY "tmp_index_taggings_on_id_convert_to_bigint_where_taggable_type_project" ON "taggings" ("id_convert_to_bigint") WHERE taggable_type = 'Project'
Duration: 30.368 min - https://console.postgres.ai/gitlab/gitlab-production-tunnel-pg12/sessions/6267/commands/21182
Screenshots or Screencasts (strongly suggested)
Does this MR meet the acceptance criteria?
Conformity
-
I have included changelog trailers, or none are needed. (Does this MR need a changelog?) -
I have added/updated documentation, or it's not needed. (Is documentation required?) -
I have properly separated EE content from FOSS, or this MR is FOSS only. (Where should EE code go?) -
I have added information for database reviewers in the MR description, or it's not needed. (Does this MR have database related changes?) -
I have self-reviewed this MR per code review guidelines. -
This MR does not harm performance, or I have asked a reviewer to help assess the performance impact. (Merge request performance guidelines) -
I have followed the style guides. -
This change is backwards compatible across updates, or this does not apply.
Availability and Testing
-
I have added/updated tests following the Testing Guide, or it's not needed. (Consider all test levels. See the Test Planning Process.) -
I have tested this MR in all supported browsers, or it's not needed. -
I have informed the Infrastructure department of a default or new setting change per definition of done, or it's not needed.
Security
Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.
-
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
Related to #334823 (closed)
Merge request reports
Activity
changed milestone to %14.2
assigned to @dfrazao-gitlab
- A deleted user
added database label
1 Warning You've made some app changes, but didn't add any tests.
That's OK as long as you're refactoring existing code,
but please consider adding any of the tooling, ~"tooling::pipelines", ~"tooling::workflow", documentation, QA labels.Reviewer roulette
Changes that require review have been detected!
Please refer to the table below for assigning reviewers and maintainers suggested by Danger in the specified category:
Category Reviewer Maintainer database Igor Drozdov ( @igor.drozdov
) (UTC+3, 1 hour ahead of@dfrazao-gitlab
)Adam Hegyi ( @ahegyi
) (UTC+2, same timezone as@dfrazao-gitlab
)~migration No reviewer available No maintainer available 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 use the GitLab Review Workload Dashboard to find other available reviewers.
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, assign them as a reviewer! Danger does not automatically notify them for you.
If needed, you can retry the
danger-review
job that generated this comment.Generated by
Dangermarked the checklist item I have included changelog trailers, or none are needed. (Does this MR need a changelog?) as completed
marked the checklist item I have added/updated documentation, or it's not needed. (Is documentation required?) as completed
marked the checklist item I have properly separated EE content from FOSS, or this MR is FOSS only. (Where should EE code go?) as completed
marked the checklist item I have added information for database reviewers in the MR description, or it's not needed. (Does this MR have database related changes?) as completed
marked the checklist item I have self-reviewed this MR per code review guidelines. as completed
marked the checklist item This MR does not harm performance, or I have asked a reviewer to help assess the performance impact. (Merge request performance guidelines) as completed
marked the checklist item I have followed the style guides. as completed
marked the checklist item This change is backwards compatible across updates, or this does not apply. as completed
requested review from @krasio
added typemaintenance label
added typefeature label
Database migrations
3 Warnings 20210806131706 - FinalizeTagginsBigintConversion had a query that exceeded timing
guidelines. Run time should not exceed 300000ms, but was it was 12259778.41ms. Please consider
possible options to improve the query performance.CREATE INDEX CONCURRENTLY
"tmp_index_taggings_on_id_bigint_where_taggable_type_project" ON "taggings"
("id_convert_to_bigint")
WHERE taggable_type = 'Project' /*application:test*/20210806131706 - FinalizeTagginsBigintConversion took 21.02min. Please add a comment that
mentions Release Managers (@gitlab-org/release/managers
) so they are informed.20210806131706 - FinalizeTagginsBigintConversion may need a background migration to comply
with timing guidelines. It took 21.02min, but should not exceed 10.0minMigrations included in this change have been executed on gitlab.com data for testing purposes. For details, please see the migration testing pipeline (limited access).
Migration Type Total runtime Result DB size change 20210806131706 - FinalizeTagginsBigintConversion Post deploy 1261.9 s -119.83 GiB Runtime Histogram for all migrations
Query Runtime Count 0 seconds - 0.01 seconds 0 0.01 seconds - 0.1 seconds 105 0.1 seconds - 1 second 1 1 second - 5 minutes 1 5 minutes + 1 Migration: 20210806131706 - FinalizeTagginsBigintConversion- Type: Post deploy
- Duration: 1261.9 s
- Database size change: -119.83 GiB
Query Calls Total Time Max Time Mean Time Rows CREATE INDEX CONCURRENTLY "tmp_index_taggings_on_id_bigint_where_taggable_type_project" ON "taggings" ("id_convert_to_bigint")
WHERE taggable_type = 'Project' /*application:test*/1 12259778.4 ms 12259778.4 ms 12259778.4 ms 0 ALTER FUNCTION "trigger_aebe8b822ad3" RESET ALL /*application:test*/
1 17.6 ms 17.6 ms 17.6 ms 0 ALTER TABLE taggings DROP CONSTRAINT taggings_pkey CASCADE /*application:test*/
1 8.1 ms 8.1 ms 8.1 ms 0 ALTER TABLE "taggings" ALTER COLUMN "id" SET DEFAULT nextval('taggings_id_seq'::regclass) /*application:test*/
1 6.5 ms 6.5 ms 6.5 ms 0 SELECT "feature_gates".*
FROM "feature_gates"
WHERE "feature_gates"."feature_key" = $1 /*application:test*/1 4.6 ms 4.6 ms 4.6 ms 1 DROP INDEX index_taggings_on_taggable_id_and_taggable_type_and_context /*application:test*/
1 3.7 ms 3.7 ms 3.7 ms 0 ALTER SEQUENCE taggings_id_seq OWNED BY taggings.id /*application:test*/
1 3.2 ms 3.2 ms 3.2 ms 0 ALTER TABLE "taggings" ALTER COLUMN "id_convert_to_bigint" SET DEFAULT 0 /*application:test*/
1 2.6 ms 2.6 ms 2.6 ms 0 DROP INDEX index_taggings_on_taggable_id_and_taggable_type /*application:test*/
1 2.6 ms 2.6 ms 2.6 ms 0 ALTER INDEX "i_taggings_on_taggable_id_convert_to_bigint_and_taggable_type" RENAME TO "index_taggings_on_taggable_id_and_taggable_type" /*application:test*/
1 2.2 ms 2.2 ms 2.2 ms 0 SELECT "batched_background_migrations".*
FROM "batched_background_migrations"
WHERE "batched_background_migrations"."job_class_name" = $1 AND "batched_background_migrations"."table_name" = $2 AND "batched_background_migrations"."column_name" = $3 AND (job_arguments = $4)
ORDER BY "batched_background_migrations"."id" ASC
LIMIT $5 /*application:test*/1 2.1 ms 2.1 ms 2.1 ms 1 ALTER TABLE taggings ADD CONSTRAINT taggings_pkey PRIMARY KEY USING INDEX taggings_pkey /*application:test*/
1 1.7 ms 1.7 ms 1.7 ms 0 DROP INDEX taggings_idx /*application:test*/
1 1.5 ms 1.5 ms 1.5 ms 0 ALTER INDEX "index_taggings_on_id_convert_to_bigint" RENAME TO "taggings_pkey" /*application:test*/
1 1.5 ms 1.5 ms 1.5 ms 0 ALTER INDEX "taggings_idx_tmp" RENAME TO "taggings_idx" /*application:test*/
1 1.4 ms 1.4 ms 1.4 ms 0 ALTER INDEX "i_taggings_on_taggable_bigint_and_taggable_type_and_context" RENAME TO "index_taggings_on_taggable_id_and_taggable_type_and_context" /*application:test*/
1 0.6 ms 0.6 ms 0.6 ms 0 DROP INDEX tmp_index_taggings_on_id_where_taggable_type_project /*application:test*/
1 0.5 ms 0.5 ms 0.5 ms 0 ALTER TABLE "taggings" RENAME COLUMN "taggable_id" TO "taggable_id_tmp" /*application:test*/
1 0.5 ms 0.5 ms 0.5 ms 0 ALTER TABLE "taggings" RENAME COLUMN "taggable_id_convert_to_bigint" TO "taggable_id" /*application:test*/
1 0.3 ms 0.3 ms 0.3 ms 0 LOCK TABLE taggings IN ACCESS EXCLUSIVE MODE /*application:test*/
1 0.3 ms 0.3 ms 0.3 ms 0 ALTER TABLE "taggings" RENAME COLUMN "id" TO "id_tmp" /*application:test*/
1 0.3 ms 0.3 ms 0.3 ms 0 ALTER TABLE "taggings" RENAME COLUMN "id_tmp" TO "id_convert_to_bigint" /*application:test*/
1 0.3 ms 0.3 ms 0.3 ms 0 ALTER INDEX "tmp_index_taggings_on_id_bigint_where_taggable_type_project" RENAME TO "tmp_index_taggings_on_id_where_taggable_type_project" /*application:test*/
1 0.3 ms 0.3 ms 0.3 ms 0 ALTER TABLE "taggings" RENAME COLUMN "taggable_id_tmp" TO "taggable_id_convert_to_bigint" /*application:test*/
1 0.2 ms 0.2 ms 0.2 ms 0 ALTER TABLE "taggings" RENAME COLUMN "id_convert_to_bigint" TO "id" /*application:test*/
1 0.2 ms 0.2 ms 0.2 ms 0 SELECT "postgres_async_indexes".*
FROM "postgres_async_indexes"
WHERE "postgres_async_indexes"."name" = $1
LIMIT $2 /*application:test*/1 0.1 ms 0.1 ms 0.1 ms 0 Histogram for FinalizeTagginsBigintConversion
Query Runtime Count 0 seconds - 0.01 seconds 0 0.01 seconds - 0.1 seconds 105 0.1 seconds - 1 second 1 1 second - 5 minutes 1 5 minutes + 1
Other migrations pending on GitLab.com
Migration Type Total runtime Result DB size change 20210730194555 - CreateIncidentManagementPendingIssueEscalations Regular 1.4 s +8.00 KiB 20210819120243 - AddThrottleFilesApiColumns Regular 1.4 s +0.00 B 20210820171834 - AddForeignKeysForPendingIssueEscalations Regular 1.6 s +0.00 B 20210823113259 - StealMergeRequestDiffCommitUsersMigration Post deploy 1.1 s +0.00 B 20210824174615 - PrepareCiBuildsMetadataAndCiBuildAsyncIndexes Post deploy 3.6 s +8.00 KiB Clone Details
Clone ID Clone Created At Clone Data Timestamp Expected Removal Time database-testing-766688
2021-08-30 05:01:55 UTC 2021-08-30 04:00:46 UTC 2021-08-30 17:23:57 +0000 Artifacts
Brought to you by gitlab-org/database-team/gitlab-com-database-testing. Epic
- A deleted user
added database-testing-automation label
- Resolved by Diogo Frazão
- Resolved by Diogo Frazão
@dfrazao-gitlab Thanks! This looks good, I have just couple of comments.
added workflowin review label and removed workflowready for development label
mentioned in epic &4785 (closed)
- Resolved by Patrick Bair
@dfrazao-gitlab Thanks, looks good! We'll have to pre-create indexes for this one.
Passing to @pbair for maintainer review / merge.
added databasereviewed label and removed databaseactive label
- Resolved by Patrick Bair
Thanks for the review, @krasio!
mentioned in merge request !67532 (merged)
changed milestone to %14.3
added missed:14.2 label
- Resolved by Patrick Bair
@dfrazao-gitlab Another MR !67574 (merged) was merged today that added a temporary index on the id column of this table:
tmp_index_taggings_on_id_where_taggable_type_project
. The temporary index will be kept through until %14.4, so we would need to handle it in this migration.Can you update this migration to also properly convert the new index to cover the correct column, as we have done with the others?
The other migration is
db/post_migrate/20210730104800_schedule_extract_project_topics_into_separate_table.rb
, so we should already have the correct ordering, since the migration in this MR will come after that./cc @krasio
removed review request for @pbair
mentioned in issue #339280 (closed)
added 4670 commits
-
aa11f330...1c82e9a4 - 4669 commits from branch
master
- acd2cf47 - Finalize conversion to bigint for taggings
-
aa11f330...1c82e9a4 - 4669 commits from branch
mentioned in merge request !69185 (closed)
requested review from @pbair
- Resolved by Patrick Bair
@dfrazao-gitlab @krasio Thanks, this LGTM! Since we are not waiting for the last index, I'll merge.
added databaseapproved label and removed databasereviewed label
added safe-to-retry label
@gitlab-org/release/managers Giving a heads up for a post-deployment migration which has to create a big index, taking about 20 minutes in database-lab.
This migration should not be at risk of deadlocks as some other similar migrations as happened here: gitlab-com/gl-infra/production#5339 (closed), but in the even it fails to get a lock for some reason, it is safe to retry.
enabled an automatic merge when the pipeline for 5bcb9ca9 succeeds
added 925 commits
-
acd2cf47...28c1cf25 - 924 commits from branch
master
- 78a1efa4 - Finalize conversion to bigint for taggings
-
acd2cf47...28c1cf25 - 924 commits from branch
enabled an automatic merge when the pipeline for 0fa3897a succeeds
added 146 commits
-
78a1efa4...905c88d7 - 144 commits from branch
master
- b36fde72 - Finalize conversion to bigint for taggings
- 7e7bf059 - Merge branch...
-
78a1efa4...905c88d7 - 144 commits from branch
added 316 commits
-
9899635e...93a4df7a - 315 commits from branch
master
- b6856991 - Finalize conversion to bigint for taggings
-
9899635e...93a4df7a - 315 commits from branch
enabled an automatic merge when the pipeline for d0fad448 succeeds
mentioned in commit d3d80a33
added workflowstaging-canary label and removed workflowin review label
added workflowstaging label and removed workflowstaging-canary label
added workflowcanary label and removed workflowstaging label
added workflowproduction label and removed workflowcanary label
mentioned in merge request !70050 (merged)
added releasedcandidate label
added releasedpublished label and removed releasedcandidate label
mentioned in merge request kubitus-project/kubitus-installer!236 (merged)
mentioned in issue #341650 (closed)