mirror of
https://github.com/ppy/osu.git
synced 2024-11-07 19:27:26 +08:00
6948035a3c
When a `SubmittingPlayer` gameplay session ends with the successful completion of a beatmap, `PrepareScoreForResultsAsync()` ensures that the score submission request is sent to and responded to by osu-web before calling `ISpectatorClient.EndPlaying()`. While previously this was mostly an implementation detail, this becomes important when considering that more and more server-side flows (replay upload, notifying about score processing completion) hook into `EndPlaying()`, and assume that by the point that message arrives at osu-spectator-server, the score has already been submitted and has been assigned a score ID that corresponds to the score submission token. As it turns out, in the early-exit path (when the user exits the play midway through, retries, or just fails), the same ordering guarantees were not provided. The score's submission ran concurrently to the spectator client `EndPlaying()` call, therefore creating a network race. osu-server-spectator components that implciitly relied on the ordering provided by the happy path, could therefore fail to unmap the score submission token to a score ID. Note that as written, the osu-server-spectator replay upload flow is not really affected by this, as it self-corrects by essentially polling the database and trying to unmap the score submission token to a score ID for up to 30 seconds. However, this change would have the benefit of reducing the polls required in such cases to just one DB retrieval. |
||
---|---|---|
.. | ||
Audio | ||
Beatmaps | ||
Collections | ||
Configuration | ||
Database | ||
Extensions | ||
Graphics | ||
Input | ||
IO | ||
IPC | ||
Localisation | ||
Models | ||
Online | ||
Overlays | ||
Performance | ||
Properties | ||
Replays | ||
Rulesets | ||
Scoring | ||
Screens | ||
Skinning | ||
Storyboards | ||
Tests | ||
Updater | ||
Users | ||
Utils | ||
.editorconfig | ||
BackgroundBeatmapProcessor.cs | ||
osu!.res | ||
osu.Game.csproj | ||
OsuGame.cs | ||
OsuGameBase_Importing.cs | ||
OsuGameBase.cs | ||
PerformFromMenuRunner.cs |