Improve stability by disabling dynamic leaderboard queries #1105
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
Related issues reported by users:
Edit: One leaderboard is so infrequently used that I did not modify its query
/data/reviewer/leaderboard
.