maproulette / maproulette-backend

MapRoulette back-end / API
Apache License 2.0
50 stars 38 forks source link

Send http error when user is not in leaderboard #1102

Closed ljdelight closed 9 months ago

ljdelight commented 9 months ago

The maproulette leaderboard is a sql table that is updated on some interval. When users send a request for their score, it is fetched from the pre-computed leaderboard in most cases.

However if the userid <:id> is not in the table, it causes the table to be generated in RAM per request. The system is not sufficiently large enough to handle even a few of those requests and the site may fail.

To avoid this, these endpoints must send back errors to the request and NEVER generate the in-memory leaderboard:

ljdelight commented 9 months ago

Change is live, resolved.