Commit graph

6 commits

Author SHA1 Message Date
GitLab Bot
45a05a8ba3 Add latest changes from gitlab-org/gitlab@master 2019-11-28 06:06:25 +00:00
Mayra Cabrera
c6acb77d8a Removes update_statistics_namespace feature flag
After measuring the impact of the namespace storage on
https://gitlab.com/gitlab-org/gitlab-ce/issues/64092. It was decided
that it's performant enough. So we can freely remove the feature flag

Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/64092
2019-08-02 09:29:29 -05:00
Mayra Cabrera
dfdfa913ba Includes logic to persist namespace statistics
- Add two new ActiveRecord models:
  - RootNamespaceStoragestatistics will persist root namespace statistics
  - NamespaceAggregationSchedule will save information when a new update
to the namespace statistics needs to be scheduled
- Inject into UpdateProjectStatistics concern a new callback that will
call an async job to insert a new row onto NamespaceAggregationSchedule
table
- When a new row is inserted a new job is scheduled. This job will
update call an specific service to update the statistics and after that
it will delete thee aggregated scheduled row
- The RefresherServices makes heavy use of arel to build composable
queries to update Namespace::RootStorageStatistics attributes.
- Add an extra worker to traverse pending rows on
NAmespace::AggregationSchedule table and schedule a worker for each one
of this rows.
- Add an extra worker to traverse pending rows on
NAmespace::AggregationSchedule table and schedule a worker for each one
of this rows
2019-07-02 14:44:39 +00:00
Mayra Cabrera
4bf3f54607 Cleans up UpdateProjectStatistics concern
- Renames attributes from stat to project_statistiscs_name and attribute
to statistic_attribute
- Reordes methods on UpdateProjectStatistics concern
- Removes unused module from Ci::Build
2019-06-03 15:06:03 +00:00
Heinrich Lee Yu
97cd3e8c5a Remove use of deprecated methods
Changed after upstream refactor
2019-04-23 08:31:23 +08:00
Alessio Caiazza
fa2968256c Extract ProjectStatistics updates into a concern
Refactor existing tests as a shared example
2019-04-19 09:37:14 +00:00