diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2020-08-12 12:30:00 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2020-08-12 12:55:28 +0300 |
commit | 36b8f5cf4d809d5063fe7d0592e8027951fc46e6 (patch) | |
tree | 6693b5bf361c7a4bb55c7e756a1120d3c364e8ef /proto/repository-service.proto | |
parent | 6730c101d0be2db5155b6e2c4de689dc906337f4 (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/repository-service.proto')
-rw-r--r-- | proto/repository-service.proto | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/proto/repository-service.proto b/proto/repository-service.proto index 3b886d858..a4759fe49 100644 --- a/proto/repository-service.proto +++ b/proto/repository-service.proto @@ -35,7 +35,7 @@ service RepositoryService { } rpc RepositorySize(RepositorySizeRequest) returns (RepositorySizeResponse) { option (op_type) = { - op: MUTATOR + op: ACCESSOR }; } rpc ApplyGitattributes(ApplyGitattributesRequest) returns (ApplyGitattributesResponse) { |