Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Steinhardt <psteinhardt@gitlab.com>2020-08-12 12:30:00 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2020-08-12 12:55:28 +0300
commit36b8f5cf4d809d5063fe7d0592e8027951fc46e6 (patch)
tree6693b5bf361c7a4bb55c7e756a1120d3c364e8ef /proto/ssh.proto
parent6730c101d0be2db5155b6e2c4de689dc906337f4 (diff)
proto: Fix accessors mislabeled as mutators
Besides other things, the accessor/mutator label for RPCs influences routing decisions, queueing of replication jobs and registration of transactions. While accessors may get routed to any up-to-date node, mutators will need to get routed either to the primary or to all nodes at once when strong consistency is enabled. As a result, accessors are typically served a lot more efficiently. We currently have two functions which seem to be mislabeled as mutators while they will only access repository info: - /gitaly.RepositoryService/RepositorySize: this reports the repository size by spawning `du -sk` on the repository. - /gitaly.SSHService/SSHUploadArchive: this spawns `git upload-archive`, which will create a Git archive on the server side and feed it into a client-side `git archive` call. Both are readonly and thus shouldn't have a mutator label, so let's fix this and reclassify them as accessors.
Diffstat (limited to 'proto/ssh.proto')
-rw-r--r--proto/ssh.proto2
1 files changed, 1 insertions, 1 deletions
diff --git a/proto/ssh.proto b/proto/ssh.proto
index 43367d330..e4f936017 100644
--- a/proto/ssh.proto
+++ b/proto/ssh.proto
@@ -25,7 +25,7 @@ service SSHService {
// To forward 'git upload-archive' to Gitaly for SSH sessions
rpc SSHUploadArchive(stream SSHUploadArchiveRequest) returns (stream SSHUploadArchiveResponse) {
option (op_type) = {
- op: MUTATOR
+ op: ACCESSOR
};
}
}