Commit Graph

9 Commits

Author SHA1 Message Date
Bob Van Landuyt ac86249039 Don't link LFS-objects multiple times.
If Unlinking a fork would fail somewhere after this, the LFS objects
might still be linked. Which would cause issues when trying to destroy
a project.
2017-12-19 17:06:18 +01:00
Bob Van Landuyt 7582bc8b4e Unlink a project from a fork network when it's source was deleted.
We need to close all merge requests coming from the project within the
entire fork network.
2017-11-03 12:17:59 +01:00
Bob Van Landuyt 8160550439 Remove membership from fork network when unlinking 2017-10-07 11:46:23 +02:00
Yorick Peterse aef9f1eb94
Cache the number of forks of a project
The number of forks of a project doesn't change very frequently and
running a COUNT(*) every time this information is requested can be quite
expensive. We also end up running such a COUNT(*) query at least twice
on the homepage of a project.

By caching this data and refreshing it when necessary we can reduce
project homepage loading times by around 60 milliseconds (based on the
timings of https://gitlab.com/gitlab-org/gitlab-ce).
2017-08-14 18:00:28 +02:00
Rémy Coutable cddc5cacfb Use described_class when possible
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-07-27 14:31:53 +02:00
Rémy Coutable ddccd24c13 Remove superfluous lib: true, type: redis, service: true, models: true, services: true, no_db: true, api: true
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-07-27 14:31:53 +02:00
Grzegorz Bizon 0430b76441 Enable Style/DotPosition Rubocop 👮 2017-06-21 13:48:12 +00:00
Baldinof 65fa716173 Fix rubocop in unlink fork service specs 2016-04-03 15:17:14 +00:00
Baldinof fa4126acff Move unlink fork logic to a service 2016-03-22 15:34:35 +01:00