Skip to content

Enable DISTINCT optimization for ObjectHierarchy globally [RUN ALL RSPEC] [RUN AS-IF-FOSS]

Adam Hegyi requested to merge ah-global-use-distinct-object-hierarchy into master

What does this MR do?

This MR changes the namespace hierarchy recursive query to use ROW_NUMBER instead of the array based depth calculation. The ROW_NUMBER will be used to re-sort the rows after DISTINCT is called.

The MR builds on top of !57047 (closed)

Globally enabling the DISTINCT fix (MR above) caused several test case failures because the ARRAY[] based approach does not work well when the ancestors_base contains parent and child records. Errors

Related issues:

  1. gitlab-com/gl-infra/production#4024 (closed)
  2. &5617 (closed)

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
Edited by Dan Jensen

Merge request reports

Loading