Use traversal_ids to check the limited indexed namespaces
What does this MR do and why?
There was a bad query which was causing load alerts on CPU Issue Link: https://gitlab.com/gitlab-com/gl-infra/capacity-planning-trackers/gitlab-com/-/issues/1877 and @ahegyi @DylanGriffith helped me fix and simplify the query.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- In the rails console run
::Gitlab::CurrentSettings.elasticsearch_indexes_namespace?(Namespace.first)
with and without changes in the MR and you can see the difference in the queries just make sure enable the limited indexing.
Related to #481956 (closed)
Edited by Siddharth Dungarwal