Commit Graph

70 Commits

Author SHA1 Message Date
GitLab Bot 8e359577a7 Add latest changes from gitlab-org/gitlab@master 2022-09-16 18:10:35 +00:00
GitLab Bot 2571f43401 Add latest changes from gitlab-org/gitlab@master 2022-08-16 21:12:07 +00:00
GitLab Bot fd1c75caeb Add latest changes from gitlab-org/gitlab@master 2022-08-02 03:09:33 +00:00
GitLab Bot 152d3b652d Add latest changes from gitlab-org/gitlab@master 2022-07-13 09:08:30 +00:00
GitLab Bot 2828f81d2a Add latest changes from gitlab-org/gitlab@master 2022-07-01 12:08:08 +00:00
GitLab Bot b330f7f0bf Add latest changes from gitlab-org/gitlab@master 2022-01-11 18:16:38 +00:00
GitLab Bot 4d0bc99be4 Add latest changes from gitlab-org/gitlab@master 2021-10-25 21:12:12 +00:00
GitLab Bot 975eac4992 Add latest changes from gitlab-org/gitlab@master 2021-08-25 12:11:32 +00:00
GitLab Bot b70394d26f Add latest changes from gitlab-org/gitlab@master 2021-08-20 12:09:31 +00:00
GitLab Bot da12067d6b Add latest changes from gitlab-org/gitlab@master 2021-08-13 09:09:58 +00:00
GitLab Bot ef8c47e97e Add latest changes from gitlab-org/gitlab@master 2021-01-20 15:10:29 +00:00
GitLab Bot 8e35232810 Add latest changes from gitlab-org/gitlab@master 2020-09-02 15:10:54 +00:00
GitLab Bot bdca097916 Add latest changes from gitlab-org/gitlab@master 2020-08-11 03:11:00 +00:00
GitLab Bot 757d2fda7e Add latest changes from gitlab-org/gitlab@master 2020-06-26 21:08:51 +00:00
GitLab Bot c59765a50a Add latest changes from gitlab-org/gitlab@master 2020-06-24 18:09:03 +00:00
GitLab Bot 927df95cc4 Add latest changes from gitlab-org/gitlab@master 2020-05-15 12:08:28 +00:00
GitLab Bot c158fa8d69 Add latest changes from gitlab-org/gitlab@master 2020-01-16 12:08:32 +00:00
GitLab Bot 784fae4b9d Add latest changes from gitlab-org/gitlab@master 2019-12-12 12:07:33 +00:00
GitLab Bot 4e375367b7 Add latest changes from gitlab-org/gitlab@master 2019-12-07 00:07:51 +00:00
GitLab Bot ab7cf450ba Add latest changes from gitlab-org/gitlab@master 2019-12-03 18:06:49 +00:00
GitLab Bot a048261403 Add latest changes from gitlab-org/gitlab@master 2019-11-21 09:06:16 +00:00
GitLab Bot 6791eefead Add latest changes from gitlab-org/gitlab@master 2019-10-21 09:06:22 +00:00
GitLab Bot 25989ab7ef Add latest changes from gitlab-org/gitlab@master 2019-10-18 11:11:44 +00: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 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
Thong Kuah 4ec16912b8 Autocorrect with RSpec/ExampleWording cop
- rewords examples starting with 'should'
- rewords examples starting with 'it'

Note: I had to manually fixup "onlies" to "only"
2019-04-05 08:43:27 +00:00
Luke Duncalfe 38bf176c3c Enrich commits with full data in CommitCollection
Allow incomplete commit records to load their full data from gitaly.

Commits can be based on a Hash of data retrieved from PostgreSQL, and
this data can be intentionally incomplete in order to save space.

A new method #gitaly? has been added to Gitlab::Git::Commit, which
returns true if the underlying data source of the Commit is a
Gitaly::GitCommit.

CommitCollection now has a method #enrich which replaces non-gitaly
commits in place with commits from gitaly.

CommitCollection#without_merge_commits has been updated to call this
method, as in order to determine a merge commit we need to have parent
data.

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/58805
2019-03-22 10:26:15 +13: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
Stan Hu 82b6e5378a Send project name with Gitaly repository requests
When hashed storage is in use, it's helpful to have the project
name associated with the request.

Closes https://gitlab.com/gitlab-org/gitaly/issues/1394
2019-02-05 21:33:09 -08:00
Douwe Maan 5f0e4040ce
Batch load only data from same repository when lazy object is accessed
By specifying `key`, we get a different lazy batch loader for each
repository, which means that accessing a lazy object from one repository
will only result in that repository's objects being fetched, not those
of other repositories, saving us some unnecessary Gitaly lookups.
2018-11-26 11:15:18 +01:00
Zeger-Jan van de Weg 16346eb5b9 Revert "Merge branch 'revert-e2aa2177' into 'master'"
This reverts merge request !23229
2018-11-20 12:29:56 +00:00
Sean McGivern 2742b871fe Revert "Merge branch 'zj-improve-gitaly-pb' into 'master'"
This reverts merge request !23140
2018-11-20 10:36:52 +00:00
Sean McGivern e2aa2177a7 Merge branch 'zj-improve-gitaly-pb' into 'master'
Show what RPC is called in the performance bar

See merge request gitlab-org/gitlab-ce!23140
2018-11-20 06:42:49 +00:00
Zeger-Jan van de Weg 4ca5eadddb
Remove duplicate tests for Gitaly
The disabling of Gitaly was basically stubbing `Feature.enabled?` call,
which was never triggered.
2018-11-19 14:40:53 +01:00
George Tsiolis 566ba126f5 Fix typos in lib 2018-11-15 12:15:43 +02:00
Alejandro Rodríguez a99bf447a2 Remove Gitlab::Git::Repository#rugged and Gollum code
Cleanup code, and refactor tests that still use Rugged. After this, there should
be no Rugged code that access the instance's repositories on non-test
environments. There is still some rugged code for other tasks like the
repository import task, but since it doesn't access any repository storage path
it can stay.
2018-10-02 16:34:28 -03:00
Alejandro Rodríguez 01de2b5df8 Refactor gitlab:import:repos task to remove direct disk access 2018-07-31 16:28:44 -04:00
Jacob Vosmaer (GitLab) 5c651daa97 Remove unreachable Git code 2018-07-18 11:12:57 +00:00
Zeger-Jan van de Weg ec78d29a6e
FindAllCommits mandatory
Closes https://gitlab.com/gitlab-org/gitaly/issues/326
2018-06-28 13:42:10 +02:00
Jacob Vosmaer f4d6834786 Make Gitaly signature RPC's mandatory 2018-06-27 14:32:09 +02:00
Zeger-Jan van de Weg e4a9b0771a
ListCommitByOid isn't called with an empty batch
Batching commits for performance improvements, might lead to empty
batches being used. This isn't the case yet, but to guard against this
in future cases, a guard clause is added.
2018-06-13 15:23:34 +02:00
Jacob Vosmaer f376347f24 Find and mark more Git disk access locations, part 2 2018-06-12 14:33:37 +02:00
Kim "BKC" Carlbäcker 0db994fedc Fix encoding error in Gitaly::Commit::TreeEntry 2018-05-30 17:33:17 +02:00
Ahmad Sherif 019f5e2469 Add handling for commit/tags with big messages 2018-05-18 20:51:10 +02:00
Zeger-Jan van de Weg dfdd881510
Workhorse to send raw diff and patch for commits
Prior to this change, this was done through unicorn. In theory this
could time out. Workhorse has been sending these raw patches and diffs
for a long time and is stable in doing so.

Added bonus is the fact that `Commit#to_patch` can be removed.

`Commit#to_diff` too, which closes
https://gitlab.com/gitlab-org/gitaly/issues/324

Closes https://gitlab.com/gitlab-org/gitaly/issues/1196
2018-05-16 11:52:43 +02:00
Ahmad Sherif 03f3350f3f Fetch commit signatures from Gitaly in batches
Closes gitaly#1046
2018-03-01 18:31:31 +01:00
Zeger-Jan van de Weg f42bf66eef
Add unit tests for Gitaly types 2018-02-20 13:57:33 +01:00
Jacob Vosmaer (GitLab) 4d87f3bb37 Retrieve commit signatures with Gitaly 2018-01-18 14:10:17 +00:00
Jacob Vosmaer ac2cb65ab3 Remove the Commit#tree method 2018-01-04 18:00:28 +01:00
Stan Hu 25a868753b Speed up generation of commit stats by using Rugged native methods
The previous implementation iterated across the entire patch set
to determine the number of lines added, deleted, and changed. Rugged
has a native method `Rugged::Diff#stat` that does this already,
which appears to be a little faster and require less RAM than doing
this ourselves.

Improves performance in #41524
2018-01-02 23:48:19 -08:00