Commit 3a30dffd authored by John Cai's avatar John Cai

Check that feature database and table exists for gitaly features

parent 3fe2804c
......@@ -244,7 +244,9 @@ module Gitlab
end
def self.feature_enabled?(feature_name)
Feature.enabled?("gitaly_#{feature_name}")
Feature::FlipperFeature.table_exists? && Feature.enabled?("gitaly_#{feature_name}")
rescue ActiveRecord::NoDatabaseError
false
end
# Ensures that Gitaly is not being abuse through n+1 misuse etc
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment