Skip to content

Don't require proto annotation for cluster administration RPCs

Gitaly's RPC definitions need to have operation type annotations as Praefect uses the information for making routing and replication decisions.

PraefectInfoService contains RPCs used to administer a Gitaly cluster. These RPCs are handled by Praefect directly. Praefect does use the annotations of these RPCs to make any kind of decisions, except for recording the type in a Prometheus metric.

The current annotations are not accurate either. ConsistencyCheck is marked as an accessor but can cause mutations through scheduling replication jobs. DatalossCheck is marked as server scoped operations while they are in fact operating on a virtual storage. RepositoryReplicas is operating on replicas of a single repository but is scoped for a server.

We should change our proto buf linter to not require these annotations for cluster administration RPCs.

Edited by Sami Hiltunen
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information