Skip to content

proto: Introduce new UpdateReference RPC

Patrick Steinhardt requested to merge pks-rpc-introduce-update-references into master

Introduce a new UpdateReference RPC which can update a set of references in a single atomic call. This RPC fills the gap between the preexisting WriteRef and DeleteRefs calls:

- `WriteRef` can only update a single reference at once, but does
  allow the caller to perform reference updates, creations and
  deletions in a raceless way by accepting an expected old object
  ID.

- `DeleteRefs` can delete multiple references at once, but does not
  allow the caller to perform these deletions in a raceless way.

UpdateReferences is thus designed to take a set of references with their respective old object IDs that they are expected to currently point to. If these are specified, any such reference will only be updated in case the current value of the reference matches the expected value.

This RPC shall eventually replace both WriteRef and DeleteRefs.

Closes Provide a way to racelessly update multiple ref... (#5084 - closed).

Merge request reports