mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 14:17: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. |
||
---|---|---|
.. | ||
Break | ||
HUD | ||
PlayerSettings | ||
BeatmapMetadataDisplay.cs | ||
BreakOverlay.cs | ||
BreakTracker.cs | ||
ComboEffects.cs | ||
DimmableStoryboard.cs | ||
EpilepsyWarning.cs | ||
FailAnimation.cs | ||
FailOverlay.cs | ||
GameplayClockContainer.cs | ||
GameplayClockExtensions.cs | ||
GameplayMenuOverlay.cs | ||
GameplayState.cs | ||
HotkeyExitOverlay.cs | ||
HotkeyRetryOverlay.cs | ||
HUDOverlay.cs | ||
IGameplayClock.cs | ||
ILocalUserPlayInfo.cs | ||
KeyCounter.cs | ||
KeyCounterAction.cs | ||
KeyCounterDisplay.cs | ||
KeyCounterKeyboard.cs | ||
KeyCounterMouse.cs | ||
MasterGameplayClockContainer.cs | ||
OffsetCorrectionClock.cs | ||
PauseOverlay.cs | ||
Player.cs | ||
PlayerConfiguration.cs | ||
PlayerLoader.cs | ||
ReplayPlayer.cs | ||
ReplayPlayerLoader.cs | ||
ResumeOverlay.cs | ||
RoomSubmittingPlayer.cs | ||
SaveFailedScoreButton.cs | ||
ScreenSuspensionHandler.cs | ||
ScreenWithBeatmapBackground.cs | ||
SkipOverlay.cs | ||
SoloPlayer.cs | ||
SoloSpectator.cs | ||
SoloSpectatorPlayer.cs | ||
SpectatorPlayer.cs | ||
SpectatorPlayerLoader.cs | ||
SpectatorResultsScreen.cs | ||
SquareGraph.cs | ||
SubmittingPlayer.cs |