Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TECH] Migrer la colonne Answer.id de INTEGER en BIG INTEGER (Partie 3) #4130

Merged
merged 2 commits into from May 9, 2022

Conversation

yahyayouness
Copy link
Contributor

@yahyayouness yahyayouness commented Feb 22, 2022

🦄 Problème

Voir Partie 1 #3357
Voir Partie 2 #4127

🤖 Solution

Créer les

  • contraintes d'intégrités
  • index

Pour les deux tables temopraires:

  • answers_bigint
  • knowledge-elements_bigint.

🌈 Remarques

Résultat sur une environnement iso prod: 6h pour la création des contraintes et d'index 15h lors du dernier test.

Test 1
,"pid":24,"hostname":"pix-int-to-bigint-test-one-off-1115","msg":"Start adding constraints and indexes to answers ke bigint tables"}
2022-02-18 11:55:36.280651704 +0100 CET [one-off-1115] {"level":30,"time":1645181736280,"pid":24,"hostname":"pix-int-to-bigint-test-one-off-1115","msg":"Start script... "}
2022-02-18 11:55:36.370391091 +0100 CET [one-off-1115] {"level":30,"time":1645181736369,"pid":24,"hostname":"pix-int-to-bigint-test-one-off-1115","msg":"number of rows answer table 707264980"}
2022-02-18 11:55:36.370397041 +0100 CET [one-off-1115] {"level":30,"time":1645181736369,"pid":24,"hostname":"pix-int-to-bigint-test-one-off-1115","msg":"create indexes and constraints for answers_bigint table"}
2022-02-18 15:40:47.705346425 +0100 CET [one-off-1115] {"level":30,"time":1645195247704,"pid":24,"hostname":"pix-int-to-bigint-test-one-off-1115","msg":"\nEnd script: copy done successfully."}

Test 2
Start script...
2022-02-09 17:17:03.320709810 +0100 CET [one-off-4015] Start adding constraints to answers ke bigint tables
2022-02-09 17:17:03.632666565 +0100 CET [one-off-4015] number of rows answer table 686892528
2022-02-09 17:17:03.632677390 +0100 CET [one-off-4015] create indexes and constraints for answers_bigint table
2022-02-09 18:06:54.436501877 +0100 CET [one-off-4015] create indexes and constraints for knowledge-elements_bigint table
2022-02-09 23:21:57.814662289 +0100 CET [one-off-4015] Call to addConstraintsAndIndexToAnswersKeBigintTemporaryTables took 21894493.60166931 milliseconds
2022-02-09 23:21:57.814666098 +0100 CET [one-off-4015] Finish add constraints

💯 Pour tester

En local:

1/ Lancer le script avec l'instruction:

LOG_LEVEL=debug node /scripts/bigint/answer/add-constraints-and-indexes-to-answers-ke-temporary-tables-with-bigint.js

2/ vérifier que toutes les contraintes et indexes des tables answer_bigint et knowledge-elements_bigint ont été créés avec succès.

En RA:

1/ Lancer le script avec l'instruction:

LOG_LEVEL=debug node /scripts/bigint/answer/add-constraints-and-indexes-to-answers-ke-temporary-tables-with-bigint.js

2/ vérifier que toutes les contraintes et indexes des tables answer et KE ont été créés avec succès.

table answer vers answer_bigint
table knowledge-elements vers knowledge-elements_bigint

Env iso production / Application pix-int-to-bigint

voir log dans la description dans la PR. (Done)

@yahyayouness yahyayouness added team-captains This is your captain speaking cross-team Toutes les équipes de dev labels Feb 22, 2022
@yahyayouness yahyayouness force-pushed the migrate-int-to-bigint-answers-ke-step3 branch from 21e8135 to f4bf7bf Compare February 22, 2022 17:32
@pix-service
Copy link
Contributor

Copy link
Contributor

@octo-topi octo-topi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Il y a une contrainte NOT NULLABLE en trop (j'ai push un commit)
J'ai aussi rajouté un test automatisé
Je propose aussi de mettre le scope de la transaction et de supprimer le commit explicite (voir #4127 (comment))
Si ces trois points sont corrigés (et un test relancé sur les données iso-prod), c'est ✔️ pour moi

@yahyayouness yahyayouness force-pushed the migrate-int-to-bigint-answers-ke-step3 branch 3 times, most recently from 87e8250 to b855238 Compare March 2, 2022 14:07
Copy link
Contributor

@octo-topi octo-topi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bon pour moi ! Mergeable dès que le test avec des données iso-production est rééexécuté et ne montre pas de régressions.

@yahyayouness yahyayouness force-pushed the migrate-int-to-bigint-answers-ke-step3 branch from b855238 to 8e0a79c Compare March 23, 2022 14:19
@yahyayouness yahyayouness changed the base branch from dev to migrate-int-to-bigint-answers-ke-step2 March 23, 2022 14:20
@yahyayouness yahyayouness force-pushed the migrate-int-to-bigint-answers-ke-step3 branch 6 times, most recently from cdd2d0e to d70c013 Compare March 24, 2022 10:50
@yahyayouness yahyayouness force-pushed the migrate-int-to-bigint-answers-ke-step2 branch from b414ceb to 91d6af4 Compare March 28, 2022 09:26
@pix-service-auto-merge pix-service-auto-merge force-pushed the migrate-int-to-bigint-answers-ke-step2 branch from 91d6af4 to 9e38f78 Compare March 28, 2022 10:36
@yahyayouness yahyayouness force-pushed the migrate-int-to-bigint-answers-ke-step2 branch from 0b87b62 to fb719d1 Compare March 28, 2022 11:25
@pix-service-auto-merge pix-service-auto-merge force-pushed the migrate-int-to-bigint-answers-ke-step2 branch from fb719d1 to 988091e Compare March 28, 2022 14:45
Base automatically changed from migrate-int-to-bigint-answers-ke-step2 to dev March 28, 2022 14:53
@yahyayouness yahyayouness force-pushed the migrate-int-to-bigint-answers-ke-step3 branch 3 times, most recently from 556ae0f to 634d78c Compare March 29, 2022 15:08
@octo-topi octo-topi force-pushed the migrate-int-to-bigint-answers-ke-step3 branch from 634d78c to b8f47c3 Compare March 30, 2022 12:37
@yahyayouness yahyayouness force-pushed the migrate-int-to-bigint-answers-ke-step3 branch from b8f47c3 to 35fd07a Compare April 6, 2022 17:16
@octo-topi octo-topi removed the cross-team Toutes les équipes de dev label May 9, 2022
yahya and others added 2 commits May 9, 2022 09:55
Co-authored-by: Pierre Top <ptop@octo.com>
Co-authored-by: Pierre Top <ptop@octo.com>
@yahyayouness yahyayouness force-pushed the migrate-int-to-bigint-answers-ke-step3 branch from c34ea0e to a959396 Compare May 9, 2022 08:07
@pix-service-auto-merge pix-service-auto-merge merged commit aa6c183 into dev May 9, 2022
@pix-service-auto-merge pix-service-auto-merge deleted the migrate-int-to-bigint-answers-ke-step3 branch May 9, 2022 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants