Commit Graph

24 Commits

Author SHA1 Message Date
GitLab Bot 71da5de44f Add latest changes from gitlab-org/gitlab@master 2020-08-05 15:09:59 +00:00
GitLab Bot b64a8161c9 Add latest changes from gitlab-org/gitlab@master 2020-05-29 18:08:26 +00:00
GitLab Bot 5abd2b70c8 Add latest changes from gitlab-org/gitlab@master 2020-05-21 00:08:06 +00:00
GitLab Bot c77fda905a Add latest changes from gitlab-org/gitlab@master 2020-02-27 21:09:17 +00:00
GitLab Bot a8c82a6395 Add latest changes from gitlab-org/gitlab@master 2020-02-25 03:08:49 +00:00
GitLab Bot 390582e118 Add latest changes from gitlab-org/gitlab@master 2020-01-27 18:09:04 +00:00
GitLab Bot 8b1228b0d4 Add latest changes from gitlab-org/gitlab@master 2020-01-10 15:07:47 +00:00
GitLab Bot fb73ca3398 Add latest changes from gitlab-org/gitlab@master 2019-12-27 15:08:16 +00:00
Stan Hu 291df05e43 Add Rugged calls to performance bar
This will help diagnose the source of excessive I/O from Rugged
calls. To implement this, we need to obtain the full list of arguments
sent to each request method.
2019-07-23 21:38:05 -07:00
Stan Hu 1136c0c8e9 Add Rugged calls and duration to API and Rails logs
This adds `rugged_duration_ms` and `rugged_calls` fields to
`api_json.log` and `production_json.log`. This will make it easier to
identify performance issues caused by excessive I/O.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/64676
2019-07-18 06:53:39 -07:00
John Cai 8765d53737 Wrap rugged calls with access disk block
Whenever we use the rugged implementation, we are going straight to disk
so we want to bypass the disk access check.
2019-07-16 13:54:01 -07:00
John Cai 8152e1aa4a Use Rugged if we detect storage is NFS and we can access the disk
Add a module we use as a singleton to determine whether or not rails is
able to access the disk
2019-07-05 10:31:47 -07:00
Stan Hu c1827f1c50 API: Fix recursive flag not working with Rugged get_tree_entries flag
Attempting to use the API endpoint
/projects/:id/repository/tree?recursive=true would only return a subset
of the results since the full recursive list wasn't actually being
returned.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/61979
2019-05-20 12:19:15 -07:00
Stan Hu 2fc4de6ab6 Bring back Rugged implementation of ListCommitsByOid
This brings back changes in
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/20432.

For users using Gitaly on top of NFS, accessing the Git data directly
via Rugged may be faster than going through than Gitaly. This merge
request introduces the feature flag `rugged_list_commits_by_oid` to
activate the Rugged method.

For one customer, we saw that ListCommitsByOid was the second highest
used endpoint that may be causing increased load.
2019-04-17 05:09:18 -07:00
Stan Hu 8686e01250 Avoid excessive recursive calls with Rugged TreeEntries
The Rugged implementation was recursively scanning the repository to
create `flat_path` because the post-process step was being called from
with a loop. For large repositories, this was significantly slowing
things down. Break the call to `rugged_populate_flat_path` out of this
loop to make this work efficiently.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/59759
2019-03-31 22:14:19 -07:00
Stan Hu 4ee08fd1f7 Add back Rugged support for retrieving a commit tree entry
This brings back some of the changes in
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/20176/diffs.

We discovered another N+1 that hits Gitaly `TreeEntry` via the
`RelativeLinkFilter`:
https://gitlab.com/gitlab-org/gitlab-ce/issues/58657. When a blob is
loaded with many relative links, `TreeEntry` is called for each link to
scan the URI type.

There are multiple paths that hit Gitaly `TreeEntry`, and
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/25706 did not
cover all cases. This commit covers another common use case.

For users using Gitaly on top of NFS, accessing the Git data directly
via Rugged may be faster than going through than Gitaly. This merge
request introduces the feature flag `rugged_commit_tree_entry` to
activate the Rugged method.
2019-03-08 16:01:59 -08:00
Sean McGivern b63efb09a5 Merge branch 'sh-rugged-get-tree-entry' into 'master'
Bring back Rugged implementation of TreeEntry

See merge request gitlab-org/gitlab-ce!25706
2019-03-07 15:57:06 +00:00
Stan Hu 46c8cc35a0 Remove unnecessary return statements in tree.rb 2019-03-07 06:33:55 -08:00
Stan Hu 8a68f91229 Fix return nil Rubocop offenses 2019-03-07 05:13:41 -08:00
Stan Hu 9d3e413aa7 Bring back Rugged implementation of TreeEntry
This brings back some of the changes in
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/20099/diffs

For users using Gitaly on top of NFS, accessing the Git data directly
via Rugged is more performant than Gitaly. This merge request introduces
the feature flag `rugged_tree_entry` to activate the Rugged method.

Part of four Rugged changes identified in
https://gitlab.com/gitlab-org/gitlab-ce/issues/57317.
2019-03-07 04:33:57 -08:00
Stan Hu 28883d8e44 Remove old code in TreeHelper#flatten_tree 2019-03-07 04:29:57 -08:00
Stan Hu 2c4cb7a6a8 Bring back Rugged implementation of GetTreeEntries
This brings back some of the changes in
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/20343.

For users using Gitaly on top of NFS, accessing the Git data directly
via Rugged is more performant than Gitaly. This merge request introduces
the feature flag `rugged_tree_entries` to activate the Rugged method.

Part of four Rugged changes identified in
https://gitlab.com/gitlab-org/gitlab-ce/issues/57317.
2019-03-07 04:29:51 -08:00
Stan Hu 9d294467bd Bring back Rugged implementation of CommitIsAncestor
This brings back some of the changes in
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/20095.

For users using Gitaly on top of NFS, accessing the Git data directly
via Rugged is more performant than Gitaly. This merge request introduces
the feature flag `rugged_commit_is_ancestor` to activate the Rugged
path.

Part of four Rugged changes identified in
https://gitlab.com/gitlab-org/gitlab-ce/issues/57317.
2019-03-04 12:21:31 -08:00
Stan Hu fb6a4e21d4 Bring back Rugged implementation of find_commit
This brings back some of the changes in
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/20339.

For users using Gitaly on top of NFS, accessing the Git data directly
via Rugged is more performant than Gitaly. This merge request introduces
the feature flag `rugged_find_commit` to activate Rugged paths.

There are also Rake tasks `gitlab:features:enable_rugged` and
`gitlab:features:disable_rugged` to enable/disable these feature
flags altogether.

Part of four Rugged changes identified in
https://gitlab.com/gitlab-org/gitlab-ce/issues/57317.
2019-03-01 08:45:51 -08:00