diff options
Diffstat (limited to 'lib/gitlab/database/count')
-rw-r--r-- | lib/gitlab/database/count/reltuples_count_strategy.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/database/count/tablesample_count_strategy.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/database/count/reltuples_count_strategy.rb b/lib/gitlab/database/count/reltuples_count_strategy.rb index a7bfafe2815..870cf25984b 100644 --- a/lib/gitlab/database/count/reltuples_count_strategy.rb +++ b/lib/gitlab/database/count/reltuples_count_strategy.rb @@ -54,7 +54,7 @@ module Gitlab # Querying tuple stats only works on the primary. Due to load balancing, the # easiest way to do this is to start a transaction. - ActiveRecord::Base.transaction do + ActiveRecord::Base.transaction do # rubocop: disable Database/MultipleDatabases get_statistics(non_sti_table_names, check_statistics: check_statistics).each_with_object({}) do |row, data| model = table_to_model[row.table_name] data[model] = row.estimate diff --git a/lib/gitlab/database/count/tablesample_count_strategy.rb b/lib/gitlab/database/count/tablesample_count_strategy.rb index e9387a91a14..489bc0aacea 100644 --- a/lib/gitlab/database/count/tablesample_count_strategy.rb +++ b/lib/gitlab/database/count/tablesample_count_strategy.rb @@ -61,7 +61,7 @@ module Gitlab #{where_clause(model)} SQL - rows = ActiveRecord::Base.connection.select_all(query) + rows = ActiveRecord::Base.connection.select_all(query) # rubocop: disable Database/MultipleDatabases Integer(rows.first['count']) end |