Skip to content

Geo: Always update the default branch on the secondary

Stan Hu requested to merge sh-fix-issue-9084 into master

Previously, we would only update the default branch of Geo mirror if the default branch didn't match the primary default branch. However, the Gitaly FindDefaultBranch RPC may return an arbitrary branch if HEAD points to an invalid branch, so we can't trust that result to be correct.

To ensure that the default branch is always correct, we now write it out on the Geo secondary whenever we do a sync. This incurs an additional filesystem write, but that should be relatively minor.

Closes https://gitlab.com/gitlab-org/gitlab-ee/issues/9084

Merge request reports