Merge branch 'zj-ref-exists-opt-out' into 'master'

Move Gitaly RefExists check to OPT_OUT

Closes gitaly#401

See merge request gitlab-org/gitlab-ce!18333
This commit is contained in:
Nick Thomas 2018-04-17 17:37:08 +00:00
commit b3ed751c0e
2 changed files with 7 additions and 1 deletions

View file

@ -0,0 +1,5 @@
---
title: Check if a ref exists is done by Gitaly by default
merge_request:
author:
type: performance

View file

@ -300,7 +300,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