Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
572bed1f
Commit
572bed1f
authored
Mar 05, 2020
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add comment about inter-gitaly calls
parent
f96750dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
lib/gitlab/gitaly_client.rb
lib/gitlab/gitaly_client.rb
+14
-0
No files found.
lib/gitlab/gitaly_client.rb
View file @
572bed1f
...
...
@@ -141,6 +141,20 @@ module Gitlab
# kwargs.merge(deadline: Time.now + 10)
# end
#
# The optional remote_storage keyword argument is used to enable
# inter-gitaly calls. Say you have an RPC that needs to pull data from
# one repository to another. For example, to fetch a branch from a
# (non-deduplicated) fork into the fork parent. In that case you would
# send an RPC call to the Gitaly server hosting the fork parent, and in
# the request, you would tell that Gitaly server to pull Git data from
# the fork. How does that Gitaly server connect to the Gitaly server the
# forked repo lives on? This is the problem `remote_storage:` solves: it
# adds address and authentication information to the call, as gRPC
# metadata (under the `gitaly-servers` header). The request would say
# "pull from repo X on gitaly-2". In the Ruby code you pass
# `remote_storage: 'gitaly-2'`. And then the metadata would say
# "gitaly-2 is at network address tcp://10.0.1.2:8075".
#
def
self
.
call
(
storage
,
service
,
rpc
,
request
,
remote_storage:
nil
,
timeout:
default_timeout
,
&
block
)
self
.
measure_timings
(
service
,
rpc
,
request
)
do
self
.
execute
(
storage
,
service
,
rpc
,
request
,
remote_storage:
remote_storage
,
timeout:
timeout
,
&
block
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment