Skip to content

Include CTE search optimization in Boards search

What does this MR do?

#35947 (closed)

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

Availability and Testing

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 🤖

Merge request reports

Loading