Performance improvement to the patch

This commit is contained in:
Pirate Praveen 2018-06-27 18:29:42 +05:30
parent 09ebef6214
commit c794d645dd

View file

@ -3,7 +3,7 @@ Required to support updation from 8 to 10
Bug, upstream: https://gitlab.com/gitlab-org/gitlab-ce/issues/48040 Bug, upstream: https://gitlab.com/gitlab-org/gitlab-ce/issues/48040
diff --git a/lib/gitlab/gitaly_client.rb b/lib/gitlab/gitaly_client.rb diff --git a/lib/gitlab/gitaly_client.rb b/lib/gitlab/gitaly_client.rb
index 0abae70c443..e4ff8261120 100644 index 0abae70c443..b16efe37fd2 100644
--- a/lib/gitlab/gitaly_client.rb --- a/lib/gitlab/gitaly_client.rb
+++ b/lib/gitlab/gitaly_client.rb +++ b/lib/gitlab/gitaly_client.rb
@@ -216,6 +216,12 @@ module Gitlab @@ -216,6 +216,12 @@ module Gitlab
@ -12,11 +12,10 @@ index 0abae70c443..e4ff8261120 100644
+ # If the features table does not exist, don't check the feature, just return + # If the features table does not exist, don't check the feature, just return
+ # the default + # the default
+ unless Feature::FlipperFeature.table_exists? + unless Gitlab::Database.cached_table_exists?(Feature::FlipperFeature.table_name)
+ return false + return false
+ end + end
+ +
feature = Feature.get("gitaly_#{feature_name}") feature = Feature.get("gitaly_#{feature_name}")
# If the feature has been set, always evaluate # If the feature has been set, always evaluate