summaryrefslogtreecommitdiff
path: root/doc/development/database_review.md
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-13 15:08:02 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-13 15:08:02 +0000
commit4eeb6b0d16021ab4a730eec4610eff2606421147 (patch)
tree488db828fe58f1e80dc5415970e4c929db7e4c4b /doc/development/database_review.md
parent8cc5f2790908ba9bb8eecba2b78a3c5a88c77b90 (diff)
downloadgitlab-ce-4eeb6b0d16021ab4a730eec4610eff2606421147.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/development/database_review.md')
-rw-r--r--doc/development/database_review.md9
1 files changed, 6 insertions, 3 deletions
diff --git a/doc/development/database_review.md b/doc/development/database_review.md
index 38785897361..b1c3ed47976 100644
--- a/doc/development/database_review.md
+++ b/doc/development/database_review.md
@@ -103,10 +103,13 @@ and details for a database reviewer:
need to fit comfortably within `15s` - preferably much less than that - on GitLab.com.
- For column removals, make sure the column has been [ignored in a previous release](what_requires_downtime.md#dropping-columns)
- Check [background migrations](background_migrations.md):
- - Establish a time estimate for execution on GitLab.com.
- - They should only be used when migrating data in larger tables.
- - If a single `update` is below than `1s` the query can be placed
+ - Establish a time estimate for execution on GitLab.com. For historical purposes,
+ it's highly recommended to include this estimation on the merge request description.
+ - If a single `update` is below than `1s` the query can be placed
directly in a regular migration (inside `db/migrate`).
+ - Background migrations are normally used, but not limited to:
+ - Migrating data in larger tables.
+ - Making numerous SQL queries per record in a dataset.
- Review queries (for example, make sure batch sizes are fine)
- Because execution time can be longer than for a regular migration,
it's suggested to treat background migrations as post migrations: