Skip to content

Fix slow pushes for repositories using object deduplication

Stan Hu requested to merge sh-set-alternate-refs-prefixes-gitconfig into master

On GitLab.com, we noticed pushes to the GitLab CE and EE repositories were taking 3-4 minutes because they were advertising thousands of refs from forked repositories..

Git added a config option, core.alternateRefsPrefixes, to fix that issue. From https://github.com/git/git/commit/465e73fff380808f0ba3fb17984ab8636afb6405:

When pushing into a repository that borrows its objects from an alternate object store, "git receive-pack" that responds to the push request on the other side lists the tips of refs in the alternate to reduce the amount of objects transferred. This sometimes is detrimental when the number of refs in the alternate is absurdly large, in which case the bandwidth saved in potentially fewer objects transferred is wasted in excessively large ref advertisement. The alternate refs that are advertised are now configurable with a pair of configuration variables.

Since we don't need this configured on a per-repository basis, we can set it as a global setting.

Closes gitaly#1747 (closed)

Edited by GitLab Release Tools Bot

Merge request reports

Loading