gitlab-org--gitlab-foss/spec/lib/gitlab/database/count
Stan Hu b35a6880b9 Fix counting of groups in admin dashboard
1. Ignore tables that use STI in reltuples count strategy.

   Models that use Rails' single-type inheritance, such as `Group` and
   `CiService`, need an additional WHERE clause to count the total
   properly, which isn't supported by the reltuples strategy.  For now,
   we just omit these from the statistics sampling and rely on the other
   strategies to get this data.

2. Fix tablesample count strategy not counting groups properly.

   Models such as `Group` needs a WHERE clause to distinguish it from
   namespaces. We now add in the WHERE clause if STI is in use.

Closes https://gitlab.com/gitlab-org/gitlab-ee/issues/7435
2019-03-11 23:50:47 -07:00
..
exact_count_strategy_spec.rb
reltuples_count_strategy_spec.rb Fix counting of groups in admin dashboard 2019-03-11 23:50:47 -07:00
tablesample_count_strategy_spec.rb Fix counting of groups in admin dashboard 2019-03-11 23:50:47 -07:00