Commit graph

19 commits

Author SHA1 Message Date
Alex Lossent
d96b0eac03 Allow to use same periods for housekeeping tasks
This enables skipping a lesser housekeeping task
(incremental or full repack) by consistently
scheduling a higher task (respectively full repack or gc)
with the same period.
Cf. #34981
2017-09-11 17:41:07 +02:00
Tiago Botelho
39298575a8 Adds exclusive lease to Git garbage collect worker. 2017-09-07 18:52:04 +01:00
Lin Jen-Shin
5c31c72048 Use block rather than just b 2017-08-24 17:36:16 +08:00
Lin Jen-Shin
140ac8d2ad Add changelog and tests 2017-08-23 21:51:21 +08:00
Robert Speicher
c8b802471b Enable the RSpec/HookArgument cop and auto-correct offenses 2017-08-10 19:29:42 -04:00
Grzegorz Bizon
0430b76441 Enable Style/DotPosition Rubocop 👮 2017-06-21 13:48:12 +00:00
Robert Speicher
d49768296c Auto-correct RSpec/DescribedClass violations 2017-05-01 11:13:33 -04:00
Robert Speicher
ca9a79f620 Use :empty_project where possible in service specs 2017-03-27 20:44:09 -04:00
Jacob Vosmaer
6bcc52a536 Refine Git garbage collection 2016-11-04 14:30:11 +01:00
Stan Hu
282c325d02 Reset pushes_since_gc counter before specs run to ensure starting point is 0 2016-09-18 21:21:43 -07:00
Yorick Peterse
4e87c02313
Move pushes_since_gc to Redis
This moves tracking of the pushes since the last Git GC from PostgreSQL
to Redis. This reduces the number of writes on the "projects" table.
This in turn reduces the vacuuming overhead.

The lease used for incrementing the counter has been removed. This lease
was mostly put in place to prevent high database load but this isn't
needed anymore due to the counter now being stored in Redis.

Fixes gitlab-org/gitlab-ce#22125
2016-09-13 22:27:51 +02:00
Paco Guzman
0736397e08 Reset project pushes_since_gc when we enqueue the git gc call 2016-07-12 15:54:05 +02:00
Stan Hu
3dc6bf2b71 Expire the branch cache after git gc runs
Due to a stale NFS cache, it's possible that a branch lookup fails
while `git gc` is running and causes missing branches in merge requests.

Possible workaround for #15392
2016-07-12 05:42:19 -07:00
Alejandro Rodríguez
86359ec854 Refactor repository paths handling to allow multiple git mount points 2016-06-29 22:30:31 -04:00
Jacob Vosmaer
5d9cf7b415 Fix HousekeepingService tests 2016-03-18 14:46:51 +01:00
Jacob Vosmaer
30b36c92c3 Use an exception to pass messages 2016-03-15 11:03:43 +01:00
Jacob Vosmaer
0beae70efa Use strings instead of symbols 2016-03-14 18:46:38 +01:00
Jacob Vosmaer
021d53c96d Run 'git gc' every 10 pushes 2016-03-14 16:49:24 +01:00
Jacob Vosmaer
a02fe251df Allow project housekeeping only once an hour 2016-03-14 15:55:45 +01:00