diff options
author | Stan Hu <stanhu@gmail.com> | 2019-02-22 00:07:26 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-03-01 19:45:51 +0300 |
commit | fb6a4e21d4a5142e72ac5864fae29192cfc59d64 (patch) | |
tree | e5c466f4a3bca5b18f462e90564fbf1f92303460 /doc/development/gitaly.md | |
parent | d86de642d16e0f7518c7f508b5282c89128e9a58 (diff) |
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.
Diffstat (limited to 'doc/development/gitaly.md')
-rw-r--r-- | doc/development/gitaly.md | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/doc/development/gitaly.md b/doc/development/gitaly.md index d5fc403bf8b..d52920b9a5d 100644 --- a/doc/development/gitaly.md +++ b/doc/development/gitaly.md @@ -56,6 +56,44 @@ If your test-suite is failing with Gitaly issues, as a first step, try running: rm -rf tmp/tests/gitaly ``` +## Legacy Rugged code + +While Gitaly can handle all Git access, many of GitLab customers still +run Gitaly atop NFS. The legacy Rugged implementation for Git calls may +be faster than the Gitaly RPC due to N+1 Gitaly calls and other +reasons. See [the +issue](https://gitlab.com/gitlab-org/gitlab-ce/issues/57317) for more +details. + +Until GitLab has eliminated most of these inefficiencies or the use of +NFS is discontinued for Git data, Rugged implementations of some of the +most commonly-used RPCs can be enabled via feature flags: + +* `rugged_find_commit` +* `rugged_get_tree_entries` +* `rugged_tree_entry` +* `rugged_commit_is_ancestor` + +A convenience Rake task can be used to enable or disable these flags +all together. To enable: + +```sh +bundle exec rake gitlab:features:enable_rugged +``` + +To disable: + +```sh +bundle exec rake gitlab:features:disable_rugged +``` + +Most of this code exists in the `lib/gitlab/git/rugged_impl` directory. + +NOTE: **Note:** You should NOT need to add or modify code related to +Rugged unless explicitly discussed with the [Gitaly +Team](https://gitlab.com/groups/gl-gitaly/group_members). This code will +NOT work on GitLab.com or other GitLab instances that do not use NFS. + ## `TooManyInvocationsError` errors During development and testing, you may experience `Gitlab::GitalyClient::TooManyInvocationsError` failures. |