-
- Downloads
Fix fast admin counters not working when PostgreSQL has secondaries
This commit does a number of things: 1. Reduces the number of queries needed by perform a single query to get all the tuples for the relevant rows. 2. Uses a transaction to query the tuple counts to ensure that the data is retrieved from the primary. Closes #46742
Showing
- app/controllers/admin/dashboard_controller.rb 4 additions, 0 deletionsapp/controllers/admin/dashboard_controller.rb
- app/helpers/count_helper.rb 6 additions, 2 deletionsapp/helpers/count_helper.rb
- app/views/admin/dashboard/index.html.haml 10 additions, 10 deletionsapp/views/admin/dashboard/index.html.haml
- changelogs/unreleased/sh-fix-admin-page-counts-take-2.yml 5 additions, 0 deletionschangelogs/unreleased/sh-fix-admin-page-counts-take-2.yml
- lib/gitlab/database/count.rb 55 additions, 17 deletionslib/gitlab/database/count.rb
- spec/lib/gitlab/database/count_spec.rb 45 additions, 36 deletionsspec/lib/gitlab/database/count_spec.rb
- spec/views/admin/dashboard/index.html.haml_spec.rb 5 additions, 0 deletionsspec/views/admin/dashboard/index.html.haml_spec.rb
Please register or sign in to comment