Skip to content

[PR #541/cdfe60de backport][0.34] [PULP-2474] Optimize Maven repository metrics counts - #542

Merged
dkliban merged 1 commit into
0.34from
patchback/backports/0.34/cdfe60dee5cc2a112646d495b7660796dbc7fc6d/pr-541
Oct 20, 2026
Merged

dkliban merged 1 commit into
0.34from
patchback/backports/0.34/cdfe60dee5cc2a112646d495b7660796dbc7fc6d/pr-541

Conversation

@patchback

@patchback patchback Bot commented Oct 14, 2026

Copy link
Copy Markdown

This is a backport of PR #541 as merged into main (cdfe60d).

The repository metrics endpoint runs three separate COUNT(DISTINCT) queries over MavenPackage content. Combine them into one Django aggregate query using PostgreSQL row-valued DISTINCT expressions.

This preserves the API and exact results while reducing production-scale GABI latency from about 9.4–9.8s to 3.6–3.8s under three concurrent requests.

Tests:

  • Ruff format/check
  • 234 unit tests passed, 7 skipped
  • 2 focused functional tests passed in the OCI container

Addresses PULP-2474.\nImplements the query consolidation suggested in #539.

(cherry picked from commit cdfe60d)
@dkliban
dkliban force-pushed the patchback/backports/0.34/cdfe60dee5cc2a112646d495b7660796dbc7fc6d/pr-541 branch from d8292d7 to 9cdd3c3 Compare October 20, 2026 09:10
@dkliban
dkliban merged commit 8b2f4bd into 0.34 Oct 20, 2026
14 checks passed
@dkliban
dkliban deleted the patchback/backports/0.34/cdfe60dee5cc2a112646d495b7660796dbc7fc6d/pr-541 branch October 20, 2026 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants