Skip to content

Fix N+1 in runner jobs API

Heinrich Lee Yu requested to merge fix-runner-jobs-api-n-plus-1 into master

What does this MR do and why?

Adds preloads to prevent N+1 database and Gitaly calls.

This endpoint was showing up in #mech_symp_alerts. URL to logs here (internal)

We can see from the logs that these slow requests execute ~700 SQL queries and ~40 Gitaly calls

MR acceptance checklist

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

Edited by Heinrich Lee Yu

Merge request reports