3PC git-update-ref experiment
As part of #2466 (closed), a proof of concept was implemented in !1863 (diffs) for the WriteRef RPC with strong consistency.
The complexity seems to spread throughout the application of both Gitaly and Praefect, as well as protobuf changes. Further, it would create a long list of RPCs to update to support the 3PC protocol.
Another option is to push this complexity, the 3 phase commit logic that is, to Git itself. For example git-update-ref
could speak our own 3PC protocol, combined with it's own guarentees as described:
If all <ref>s can be locked with matching <oldvalue>s simultaneously, all modifications are performed. Otherwise, no modifications are performed. Note that while each individual <ref> is updated or deleted atomically, a concurrent reader may still see a subset of the modifications.