Skip to content

Track and act upon the number of executed SQL queries

Yorick Peterse requested to merge query-counts into master

What does this MR do?

This MR introduces a mechanism for measuring the number of executed SQL queries and alerting should this number exceed a given threshold. In a test environment exceeding the threshold (100 at the moment) will result in an exception being generated. In production/development environments we instead report the problem in Sentry (if enabled).

As part of this MR a variety of controllers have been allowlisted based on which tests failed with this system in place. For every allowlisted controller (action) an issue has been created to resolve those problems.

EE MR: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/4255

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

https://gitlab.com/gitlab-org/gitlab-ce/issues/40595

Edited by Chad Woolley

Merge request reports