Resolve "Address the Primary Key Overflow risk for the taggings table - Step 3: remove temporary columns and trigger"
What does this MR do?
This MR removes the columns id_convert_to_bigint, taggable_id_convert_to_bigint
and the trigger trigger_aebe8b822ad3
from the taggings
table.
migration up:
== 20210906130643 DropTemporaryColumnsAndTriggersForTaggins: migrating ========
-- remove_column("taggings", "id_convert_to_bigint")
-> 0.0014s
-- remove_column("taggings", "taggable_id_convert_to_bigint")
-> 0.0005s
== 20210906130643 DropTemporaryColumnsAndTriggersForTaggins: migrated (0.0229s)
migration down:
== 20210906130643 DropTemporaryColumnsAndTriggersForTaggins: reverting ========
-- table_exists?("taggings")
-> 0.0006s
-- column_exists?("taggings", :id)
-> 0.0013s
-- column_exists?("taggings", "id")
-> 0.0009s
-- column_exists?("taggings", "taggable_id")
-> 0.0009s
-- columns("taggings")
-> 0.0010s
-- add_column("taggings", "id_convert_to_bigint", :int, {:default=>0, :null=>false})
-> 0.0021s
-- columns("taggings")
-> 0.0009s
-- add_column("taggings", "taggable_id_convert_to_bigint", :int, {:default=>nil})
-> 0.0009s
== 20210906130643 DropTemporaryColumnsAndTriggersForTaggins: reverted (0.0376s)
Screenshots or Screencasts (strongly suggested)
How to setup and validate locally (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 #338055 (closed)
Merge request reports
Activity
changed milestone to %14.3
assigned to @dfrazao-gitlab
added 21 commits
-
42679769...177ceaff - 20 commits from branch
master
- cf72d95f - Address the PK Overflow risk for the taggins - Step 3
-
42679769...177ceaff - 20 commits from branch
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 backend Alexandru Croitor ( @acroitor
) (UTC+3, 1 hour ahead of@dfrazao-gitlab
)Terri Chu ( @terrichu
) (UTC-4, 6 hours behind@dfrazao-gitlab
)database Maxime Orefice ( @morefice
) (UTC-4, 6 hours behind@dfrazao-gitlab
)Mayra Cabrera ( @mayra-cabrera
) (UTC-5, 7 hours behind@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
Dangeradded 1 commit
- 01175477 - Address the PK Overflow risk for the taggins - Step 3
marked 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
Database migrations
Migrations 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 20210906130643 - Post deploy 47.5 s -135.17 GiB Migration: 20210906130643 -
- Type: Post deploy
- Duration: 47.5 s
- Database size change: -135.17 GiB
Query Calls Total Time Max Time Mean Time Rows ALTER TABLE "taggings" DROP COLUMN "id_convert_to_bigint" /*application:test*/
1 79.0 ms 79.0 ms 79.0 ms 0 ALTER TABLE "taggings" DROP COLUMN "taggable_id_convert_to_bigint" /*application:test*/
1 18.4 ms 18.4 ms 18.4 ms 0 DROP TRIGGER IF EXISTS trigger_aebe8b822ad3 ON "taggings" /*application:test*/
1 16.0 ms 16.0 ms 16.0 ms 0 DROP FUNCTION IF EXISTS trigger_aebe8b822ad3() /*application:test*/
1 4.4 ms 4.4 ms 4.4 ms 0
Other migrations pending on GitLab.com
Migration Type Total runtime Result DB size change 20210825182303 - RemoveDuplicateDastSiteTokensWithSameToken Post deploy 1.4 s +32.00 KiB 20210830104800 - RescheduleExtractProjectTopicsIntoSeparateTable Post deploy 1.6 s +0.00 B 20210831123008 - Post deploy 1.4 s +0.00 B 20210901153324 - SliceMergeRequestDiffCommitMigrations Post deploy 2.2 s +1.83 MiB Clone Details
Clone ID Clone Created At Clone Data Timestamp Expected Removal Time database-testing-779117
2021-09-06 15:03:59 UTC 2021-09-06 12:00:28 UTC 2021-09-07 03:06:10 +0000 Artifacts
Brought to you by gitlab-org/database-team/gitlab-com-database-testing. Epic
- A deleted user
added database-testing-automation label
added 10 commits
-
01175477...905c88d7 - 8 commits from branch
master
- 8c71ab72 - Address the PK Overflow risk for the taggins - Step 3
- 3929da04 - Merge branch...
-
01175477...905c88d7 - 8 commits from branch
- Resolved by Krasimir Angelov
@krasio Do we have a model for this table? I was not able to find it.
added 1 commit
- 9c62a76a - Address the PK Overflow risk for the taggins - Step 3
added 1 commit
- 508a3d98 - Address the PK Overflow risk for the taggins - Step 3
added 1 commit
- d8de0082 - Address the PK Overflow risk for the taggins - Step 3
added 1 commit
- 9ad54b43 - Address the PK Overflow risk for the taggins - Step 3
added 1 commit
- 8cf884ee - Address the PK Overflow risk for the taggins - Step 3
requested review from @krasio
- Resolved by Krasimir Angelov
@krasio Could you take a look here?
btw: we are getting some weird values from the
db:check-migrations
test.
added 535 commits
-
8cf884ee...30cce575 - 534 commits from branch
master
- d8f212d9 - Address the PK Overflow risk for the taggins - Step 3
-
8cf884ee...30cce575 - 534 commits from branch
- Resolved by Krasimir Angelov
@dfrazao-gitlab This one looks good, I think we should be OK to merge now, am I missing anything?
changed milestone to %14.4
added missed:14.3 label
added 1 commit
- ea48476a - Address the PK Overflow risk for the taggins - Step 3
added 1819 commits
-
ea48476a...936b33a0 - 1818 commits from branch
master
- 3944211c - Address the PK Overflow risk for the taggins - Step 3
-
ea48476a...936b33a0 - 1818 commits from branch
added 1 commit
- f9b8e8d7 - Address the PK Overflow risk for the taggins - Step 3