From 5173bc8a4c38eebe28f1afd42a4f7bef3d4854cb Mon Sep 17 00:00:00 2001 From: Zeger-Jan van de Weg Date: Thu, 12 Apr 2018 10:18:29 +0200 Subject: [PATCH] Move Gitaly RefExists check to OPT_OUT Part of the Gitaly migration as tracked in: https://gitlab.com/gitlab-org/gitaly/issues/401 Acceptance testing was done in: https://gitlab.com/gitlab-org/gitaly/issues/1014 --- changelogs/unreleased/zj-ref-exists-opt-out.yml | 5 +++++ lib/gitlab/git/repository.rb | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 changelogs/unreleased/zj-ref-exists-opt-out.yml diff --git a/changelogs/unreleased/zj-ref-exists-opt-out.yml b/changelogs/unreleased/zj-ref-exists-opt-out.yml new file mode 100644 index 00000000000..cdffecb0d0a --- /dev/null +++ b/changelogs/unreleased/zj-ref-exists-opt-out.yml @@ -0,0 +1,5 @@ +--- +title: Check if a ref exists is done by Gitaly by default +merge_request: +author: +type: performance diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb index 1a0a793564e..a2dfa4df208 100644 --- a/lib/gitlab/git/repository.rb +++ b/lib/gitlab/git/repository.rb @@ -297,7 +297,8 @@ module Gitlab # # Ref names must start with `refs/`. def ref_exists?(ref_name) - gitaly_migrate(:ref_exists) do |is_enabled| + gitaly_migrate(:ref_exists, + status: Gitlab::GitalyClient::MigrationStatus::OPT_OUT) do |is_enabled| if is_enabled gitaly_ref_exists?(ref_name) else