Addresses https://github.com/ppy/osu/discussions/34705, I suppose.
The cagey tone of that statement is because this change merely papers
over the issue. The issue in question for the user that reported this is
that they have a bunch of very old beatmaps, whose md5 hashes do not
match the online hashes, that need updating. The submission/rank date
population was running every single time for these, and failing every
time, because there is really not much useful that the lookup *can* do.
Because mappers have made `OnlineID` essentially useless for determining
the provenance of a beatmap due to reusing them to "fix" beatmap
submission failures, online IDs have been explicitly disallowed from use
in any sort of beatmap lookup flow. The only things that are allowed to
be used are: md5 of the beatmap, and filename as a fallback for very old
beatmaps / beatmap packs.
If the user has local beatmaps with md5 not matching online, chances are
that any metadata lookups are likely to fail or return bogus data. At
that point my personal feeling is that backpopulation flows should leave
such beatmaps well alone and the user should just go update the beatmap
themselves.
I am aware that updating 124 individual beatmap sets would - in the
current state of things - would probably be a ridiculously onerous thing
to do, and that people have been asking multiple times for a facility to
update all local beatmaps at once, but that discussion is out of scope
at this stage.
This was not fatal but with this change it should recover in a slightly
better way.
Also incidentally fixes the cache refetch potentially being attempted
twice by each of the two background population tasks that use it.
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 the
`BeatmapUpdater.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.
People keep asking why https://github.com/ppy/osu/pull/29553 didn't fix
their databases (as stated in the PR, it didn't intend to), so this
should do it for them.