Commit c3bab430 authored by Aleksei Lipniagov's avatar Aleksei Lipniagov

Revert "Fix Multistore FF for empty DB"

This reverts commit f7bdab1b.
parent 9d90d5a3
# frozen_string_literal: true
return unless Gitlab.com? || Gitlab.dev_or_test_env?
def feature_flags_available?
# When the DBMS is not available, an exception (e.g. PG::ConnectionBad) is raised
active_db_connection = ActiveRecord::Base.connection.active? rescue false
......@@ -9,8 +11,6 @@ rescue ActiveRecord::NoDatabaseError
false
end
return unless Gitlab.com? || Gitlab.dev_or_test_env?
Gitlab::Application.configure do
if feature_flags_available? && ::Feature.enabled?(:active_record_transactions_tracking, type: :ops, default_enabled: :yaml)
Gitlab::Database::Transaction::Observer.register!
......
......@@ -97,15 +97,11 @@ module Gitlab
end
def use_primary_and_secondary_stores?
feature_flags_available? &&
Feature.enabled?("use_primary_and_secondary_stores_for_#{instance_name.underscore}", default_enabled: :yaml) &&
!same_redis_store?
Feature.enabled?("use_primary_and_secondary_stores_for_#{instance_name.underscore}", default_enabled: :yaml) && !same_redis_store?
end
def use_primary_store_as_default?
feature_flags_available? &&
Feature.enabled?("use_primary_store_as_default_for_#{instance_name.underscore}", default_enabled: :yaml) &&
!same_redis_store?
Feature.enabled?("use_primary_store_as_default_for_#{instance_name.underscore}", default_enabled: :yaml) && !same_redis_store?
end
private
......
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