Skip to content

Fix n+1 query in extension registry list endpoint.

Administrator requested to merge list-extensions-api-n-plus-1-query into master

Created by: efritz

This alert keeps flapping: https://sourcegraph.app.opsgenie.com/alert/detail/78d8cf4f-2394-4df0-98f7-de97a44ed1f2-1582579884047/details.

It may be because the extension registry list endpoint will perform a SELECT of all ~230 extensions and perform an additional multi-join SQL query for each one in sequence before constructing a response. This will select the extensions, then do a single SQL query to get the latest release (making the endpoint only make 2 SQL queries rather than >230).

Merge request reports

Loading