Revert "Merge branch 'sc1-rate-limiting-migrator' into 'master'"
What does this MR do and why?
This reverts !106123 (merged) because the feature flag lookup became much more expensive:
def feature_flags_available?
# When the DBMS is not available, an exception (e.g. PG::ConnectionBad) is raised
active_db_connection = begin
ActiveRecord::Base.connection.active? # rubocop:disable Database/MultipleDatabases
rescue StandardError
false
end
active_db_connection && Feature::FlipperFeature.table_exists?
rescue ActiveRecord::NoDatabaseError
false
end
The call in ActiveRecord::Base.connection.active?
causes a connection to be checked out with a ;
SQL query. When this happens in a number of endpoints, we saturate the connection pool and drive up the virtual transaction rate in PostgreSQL.
Relates to gitlab-com/gl-infra/production#8311 (closed)
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Stan Hu