Include CTE search optimization in Boards search
requested to merge 35947-issues-no-results-in-issue-search-on-boards-view-when-search-criteria-is-1-or-2-letters into master
What does this MR do?
Include CTE search optimisation for searching board issues.
This change will be added behind the feature flag board_search_optimization
(enabled by default) to test possible performance issues. See !23366 (comment 282082400).
When fetched issues are sorted in the Boards::Issues::ListService
, the method #order_labels_priority
will throw the following error if we're passing a CTE:
ActiveRecord::StatementInvalid: PG::GroupingError: ERROR: column "issues.title" must appear in the GROUP BY clause or be used in an aggregate function
To prevent this, we can modify the group
clause and use all Issues
columns instead.
Screenshots
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Closes #35947 (closed)
Edited by 🤖 GitLab Bot 🤖