Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
37861037
Commit
37861037
authored
Jul 24, 2018
by
Oswaldo Ferreira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add points regarding background migrations on huge tables
parent
abae261b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
doc/development/background_migrations.md
doc/development/background_migrations.md
+8
-0
No files found.
doc/development/background_migrations.md
View file @
37861037
...
@@ -296,10 +296,18 @@ for more details.
...
@@ -296,10 +296,18 @@ for more details.
## Best practices
## Best practices
1.
Make sure to know how much data you're dealing with
1.
Make sure that background migration jobs are idempotent.
1.
Make sure that background migration jobs are idempotent.
1.
Make sure that tests you write are not false positives.
1.
Make sure that tests you write are not false positives.
1.
Make sure that if the data being migrated is critical and cannot be lost, the
1.
Make sure that if the data being migrated is critical and cannot be lost, the
clean-up migration also checks the final state of the data before completing.
clean-up migration also checks the final state of the data before completing.
1.
Make sure to know how much time it'll take to run all scheduled migrations
1.
When migrating many columns, make sure it won't generate too many
dead tuples in the process (you may need to directly query the number of dead tuples
and adjust the scheduling according to this piece of data)
1.
Make sure to discuss the numbers with a database specialist, the migration may add
more pressure on DB than you expect (measure on staging,
or ask someone to measure on production)
[
migrations-readme
]:
https://gitlab.com/gitlab-org/gitlab-ce/blob/master/spec/migrations/README.md
[
migrations-readme
]:
https://gitlab.com/gitlab-org/gitlab-ce/blob/master/spec/migrations/README.md
[
issue-rspec-hooks
]:
https://gitlab.com/gitlab-org/gitlab-ce/issues/35351
[
issue-rspec-hooks
]:
https://gitlab.com/gitlab-org/gitlab-ce/issues/35351
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment