Skip to content

Optimise member_roles.elevating related queries

Jarka Košanová requested to merge 411385-elevating-performance into master

What does this MR do and why?

In !114734 (merged) we merged adding read_vulnerabilitypermission to Custom roles. This, however, caused a performance problem. Afterward, we also added admin_vulnerability permission.

We need to improve the performance of elevating scope. Right now the query is behind a feature flag elevated_guests.

Database

I specifically tested the query called from billed_group_users for group gitlab-org as this one is used on the page we saw the problem on (group members page on gitlab.com).

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #411385 (closed)

Edited by Jessie Young

Merge request reports