Commit graph

8 commits

Author SHA1 Message Date
GitLab Bot
f1087d16f7 Add latest changes from gitlab-org/gitlab@master 2020-11-14 00:09:32 +00:00
GitLab Bot
2368893df7 Add latest changes from gitlab-org/gitlab@master 2020-08-31 15:10:41 +00:00
GitLab Bot
691ed55a05 Add latest changes from gitlab-org/gitlab@master 2020-07-06 18:09:13 +00:00
GitLab Bot
99b47e903e Add latest changes from gitlab-org/gitlab@master 2020-07-01 03:08:42 +00:00
Alessio Caiazza
606a1d2d31 Expose namespace storage statistics with GraphQL
Root namespaces have storage statistics.
This commit allows namespace owners to get those stats via GraphQL
queries like the following one

{
  namespace(fullPath: "a_namespace_path") {
    rootStorageStatistics {
      storageSize
      repositorySize
      lfsObjectsSize
      buildArtifactsSize
      packagesSize
      wikiSize
    }
  }
}
2019-08-22 22:08:28 +00:00
Heinrich Lee Yu
1ce5bcacdb Remove code related to object hierarchy in MySQL
These are not required because MySQL is not
supported anymore
2019-07-25 15:35:06 +08: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
bde41ee866 Add two new ActiveRecord models
- Namespace::Storagestatistics will persist root namespace statistics
- Namespace::AggregationSchedule will save information when a new update
to the namespace statistics needs to be scheduled

Both tables use 'namespace_id' as primary key
2019-06-25 09:54:47 -05:00