Skip to content

Refactor: change constant var to class method in query limiting

What does this MR do and why?

This job of JH failed because of Too many SQL queries:

https://jihulab.com/gitlab-cn/gitlab/-/jobs/4434322

./spec/support/shared_examples/features/resolving_discussions_in_issues_shared_examples.rb:18:

Too many SQL queries were executed in Projects::IssuesController#create: a maximum of 100 is allowed but 102 SQL queries were executed

This limit comes from constant THRESHOLD in Gitlab::QueryLimiting::Transaction.

Before reducing the number of SQL queries, JH needs to adjust this limit.

This example matches the previous discussion: https://gitlab.com/gitlab-jh/gitlab-jh-enablement/-/issues/250#note_1085620293


cc JH EM @prajnamas

Edited by Baodong

Merge request reports

Loading