Commit 4c0efcd3 authored by Furkan Ayhan's avatar Furkan Ayhan Committed by Adam Hegyi

Adjust NullifyOrphanRunnerIdOnCiBuilds batch parameters

In GitLabCom, 100k batch size and 1k sub batch size took more than
2 minutes. So, we decided to start lower than those parameters.

Also, we will allow the batch size to increase up 150k if it's possible

Changelog: other
parent ecd79f91
......@@ -3,9 +3,9 @@
class ScheduleNullifyOrphanRunnerIdOnCiBuilds < Gitlab::Database::Migration[1.0]
MIGRATION = 'NullifyOrphanRunnerIdOnCiBuilds'
INTERVAL = 2.minutes
BATCH_SIZE = 100_000
MAX_BATCH_SIZE = 100_000 # 100k * 25k = 2.5B ci_builds
SUB_BATCH_SIZE = 1_000
BATCH_SIZE = 50_000
MAX_BATCH_SIZE = 150_000
SUB_BATCH_SIZE = 500
def up
queue_batched_background_migration(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment