Ensure that star rating reprocessing does not incur online lookup requests #32273
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.
Yesterday after the lazer release there was a bit of a spike in the number of osu-web requests pointed at
/api/v2/beatmaps/lookup
specifically. The most likely reason for this is that prior to this commit, the star rating recalculation was fully performed by theBeatmapUpdater.Process()
flow.This process does full metadata lookups, and while it will attempt to use the local
online.db
metadata cache, it will also fall back to API requests if the local metadata fetch fails. While that means that the local cache likely saved us from a doomsday scenario here, it also is the case that all of that metadata lookup stuff is entirely unnecessary when wanting to just update star ratings.Therefore, this splits out only the part relevant to star ratings as a separate background process, so that it can run completely locally.