Skip to content

Only execute hooks on primary nodes

Patrick Steinhardt requested to merge pks-tx-identify-primary into master

When using reference transactions, we started pushing Git data to both primary and secondaries at the same time. As a result, git-receive-pack will be executed on all nodes, which wasn't the case previously. This leads us to also execute hooks on all nodes, which is definitely unexpected and a change in behaviour, as it would previously only have executed on the primary node.

Now that we have information available about each node's role, this commit fixes the logic to only execute both Git hooks as well as the pre-receive reference counters in case the current Gitaly node is the transaction's primary.

Fixes #2851 (closed).

Edited by GitLab Release Tools Bot

Merge request reports

Loading