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

Improve stability by disabling dynamic leaderboard queries #1105

Merged
merged 1 commit into from
Feb 23, 2024

Conversation

ljdelight
Copy link
Contributor

@ljdelight ljdelight commented Feb 23, 2024

Due to the extensive computational demand of dynamic queries for various MapRoulette leaderboards — including those for global standings, project-specific, challenge-specific, and country-specific rankings — system stability issues have been observed.

This patch disables the execution of dynamic leaderboard calculations. Requests triggering a dynamic query now result in an HTTP 400 response.

There was a presumption in the leaderboard code that every user was in the pre-generated leaderboard, and if they were not it would regen the entire thing, for all users, dynamically and per request. So it quickly overwhelmed the DB backend when there were a handful of "new" MapRoulette users to the site. This was especially unfortunate for group mapping parties.

The below leaderboards will not function until a workaround or alternative solution is determined:

  • Project-specific leaderboards
  • Challenge-specific leaderboards
  • Leaderboards featuring items not currently enabled
  • Country-specific leaderboards, excluding the global leaderboard, when multiple countries are selected
  • Any use of custom date ranges outside the predefined set of durations

Related issues reported by users:

Edit: One leaderboard is so infrequently used that I did not modify its query /data/reviewer/leaderboard.

Due to the extensive computational demand of dynamic queries for various MapRoulette leaderboards — including those for global standings, project-specific, challenge-specific, and country-specific rankings — system stability issues have been observed.

This patch disables the execution of dynamic leaderboard calculations. Requests triggering a dynamic query now result in an HTTP 400 response.

The below leaderboards will not function until a workaround or alternative solution is determined:
- Project-specific leaderboards
- Challenge-specific leaderboards
- Leaderboards featuring items not currently enabled
- Country-specific leaderboards, excluding the global leaderboard, when multiple countries are selected
- Any use of custom date ranges outside the predefined set of durations
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

idea Catch issues before they fail your Quality Gate with our IDE extension SonarLint SonarLint

@ljdelight
Copy link
Contributor Author

Created to resolve #1102

@ljdelight ljdelight merged commit 49bffd1 into main Feb 23, 2024
6 of 7 checks passed
@ljdelight ljdelight deleted the ljdelight/leaderboardLimits branch February 23, 2024 21:48
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.

1 participant