Move pushes_since_gc to Redis
What does this MR do?
This moves tracking of the pushes since the last Git GC to Redis to reduce DB load.
Are there points in the code the reviewer needs to double check?
Styling mostly.
Why was this MR needed?
Updating this column can lead to a lot of writes which in turn puts a lot of load on table vacuuming. For example, in the last hour alone we had 5067 UPDATEs for this column (per InfluxDB):
> select count(increment_pushes_since_gc_call_count) from sidekiq_transactions where time > now() - 1h;
name: sidekiq_transactions
--------------------------
time count
1473780996567714622 5067
Does this MR meet the acceptance criteria?
-
CHANGELOG entry added - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if you do - rebase it please) -
Squashed related commits together
What are the relevant issue numbers?
Merge request reports
Activity
Enabled an automatic merge when the build for 4dae337d succeeds
This patch was deployed manually to GitLab.com to alleviate the database load. Thus far this is working well.
@rdavila I think it's best to skip deploying RC2 and get this in RC3, then deploy that; otherwise we have to apply these patches again. Alternatively we can only pick this MR into the RC2 branch so we don't have to deal with any other merge conflicts (this may actually be easier).
- Resolved by Robert Speicher
Reassigned to @yorickpeterse
Added 1 commit:
- 4e87c023 - Move pushes_since_gc to Redis
Reassigned to @rspeicher
Mentioned in commit 4f6ad25b
Mentioned in merge request gitlab-com/www-gitlab-com!3202 (merged)