Skip to content

N+1 Gitaly queries in /api/v4/groups/:id/projects

ZenDesk: https://gitlab.zendesk.com/agent/tickets/111902

This is similar to https://gitlab.com/gitlab-org/gitlab-ce/issues/57113, but slightly different.

When running the following:

$ cat api_json.log | jq "select(.gitaly_calls > 100) | .route" | sort | uniq -c
  58 "/api/:version/groups/:id/projects"
  65 "/api/:version/projects"

Note the user used the per_page=100 query, so there are a lot of queries there.