summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorFelipe Artur <felipefac@gmail.com>2019-02-12 16:39:56 -0200
committerFelipe Artur <felipefac@gmail.com>2019-02-12 16:39:56 -0200
commite2aa332504f6cd9eebaa30dfeb71edcea6f9495a (patch)
treeb4282d1ccd9c848ce579bb8483b580ccfe609ee2 /db
parent362d56e65a0e23fcf4fd5bd4535d258c3659ffd5 (diff)
downloadgitlab-ce-e2aa332504f6cd9eebaa30dfeb71edcea6f9495a.tar.gz
Improve batch size
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20190211131150_add_state_id_to_issuables.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/db/migrate/20190211131150_add_state_id_to_issuables.rb b/db/migrate/20190211131150_add_state_id_to_issuables.rb
index b9d52fe63cd..d23c946cf88 100644
--- a/db/migrate/20190211131150_add_state_id_to_issuables.rb
+++ b/db/migrate/20190211131150_add_state_id_to_issuables.rb
@@ -5,10 +5,12 @@ class AddStateIdToIssuables < ActiveRecord::Migration[5.0]
DOWNTIME = false
MIGRATION = 'SyncIssuablesStateId'.freeze
- # TODO - find out how many issues and merge requests in production
- # to adapt the batch size and delay interval
- # Keep in mind that the migration will be scheduled for issues and merge requests.
- BATCH_SIZE = 5000
+ # 2019-02-12 Gitlab.com issuable numbers
+ # issues count: 13587305
+ # merge requests count: 18925274
+ # Using this 50000 as batch size should take around 13 hours
+ # to migrate both issues and merge requests
+ BATCH_SIZE = 50000
DELAY_INTERVAL = 5.minutes.to_i
class Issue < ActiveRecord::Base