Commit graph

7 commits

Author SHA1 Message Date
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
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
46c8cc35a0 Remove unnecessary return statements in tree.rb 2019-03-07 06:33:55 -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