Skip to content

Vote when reference transaction has been committed

Sami Hiltunen requested to merge smh-vote-on-committed into master

Gitaly has some RPCs that do not return proper error codes and instead return an error string in the response body. Such RPCs failures look like successful RPCs to Praefect as it depends on the status codes. If a Gitaly fails the hooks, many of these legacy RPCs pack the error into the response instead of erroring with a status code. This behavior may cause Gitaly to receive a commit and fail without informing Praefect. Praefect would then think the failed node has sucessfully committed the changes to the disk. As fixing the RPCs would involve a lot of work, this MR instead votes on the committed state of reference transactions. This performs another vote on the committed state after writing the results to the disk. This ensure that the nodes that silently failed to persist the changes are not considered as succesful when the transaction is finalized.

Related to #3623 (closed)

Merge request reports