Skip to content

Add docs for using disable_joins to avoid cross-joins

What does this MR do?

These docs will help different teams solve ~"sharding-blocker" issues where there are join queries that span ci_* and non ci_* tables caused by has_many ... through: or has_one ... through:.

It's useful to have a clear example of why this disable_joins feature cannot just be used blindly to solve all cases as the performance problems it can introduce are subtle and the Rails documentation is not clear enough about the risks of this feature.

I also removed a summary section from the docs because it was getting too difficult to keep updating the summary every time we introduced a new example and it was just duplicated effort.

Screenshots or Screencasts (strongly suggested)

How to setup and validate locally (strongly suggested)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • 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 Dylan Griffith

Merge request reports