Skip to content

proto: Introduce new "maintenance" RPC type

Gitaly classifies RPC calls into two different types:

- Accessors are all RPCs which access data without modifying the
  on-disk state of the repository.

- Mutators perform changes in repositories to modify the state as
  visible to the user.

Our maintenance RPCs don't fit into either category though: they modify on-disk data, but the end result as visible to the user shouldn't be changed by this. They should instead be considered as idempotent with regards to user-visible behaviour.

Right now those RPCs are labelled as mutators. This is not a good fit though: we have to disable transactional voting because it doesn't make sense to vote on the on-disk representation of a repository, which is not deterministic. As a consequence, we only route those requests to the primary node and replicate the change afterwards, which is not an ideal strategy.

Introduce a new RPC type for these maintenance-style RPCs. This will easily allow us to implement behaviour that's different from both accessors and mutators in a subsequent commit.

Closes #4079 (closed)

Merge request reports