Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre-compute the latest version of each artifact #1438

Merged
merged 3 commits into from
Aug 19, 2024

Conversation

adpi2
Copy link
Member

@adpi2 adpi2 commented Aug 14, 2024

Fixes #1429

When loading the project page, we need to compute the latest version of each of its artifacts. To do so, we used to sending an SQL JOIN request of the artifacts table on itself. This request was too frequent and too expensive, and it caused the recent downtimes of Scaladex.

Here we pre-compute the is_latest_version of each artifact: each time a new artifact is added, we get all the artifacts with the same ID, we compute the max version, and flag it with is_latest_version. Now the SQL request to get the latest version of each artifact of a project is a simple SELECT.

@adpi2 adpi2 merged commit 326a389 into scalacenter:main Aug 19, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Scaladex site is returning HTTP 503 responses
2 participants