1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 14:17:26 +08:00
osu-lazer/osu.Game/Screens/Play
Bartłomiej Dach 6948035a3c
Ensure score submission attempt completion before notifying spectator server when exiting play early
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.
2022-12-21 22:23:26 +01:00
..
Break Partial everything 2022-11-27 00:00:27 +09:00
HUD Fix the MOTHERLOAD of undetected issues that are now visible thanks to net6.0 2022-12-16 18:16:26 +09:00
PlayerSettings Partial everything 2022-11-27 00:00:27 +09:00
BeatmapMetadataDisplay.cs Partial everything 2022-11-27 00:00:27 +09:00
BreakOverlay.cs Partial everything 2022-11-27 00:00:27 +09:00
BreakTracker.cs Partial everything 2022-11-27 00:00:27 +09:00
ComboEffects.cs Partial everything 2022-11-27 00:00:27 +09:00
DimmableStoryboard.cs Partial everything 2022-11-27 00:00:27 +09:00
EpilepsyWarning.cs Partial everything 2022-11-27 00:00:27 +09:00
FailAnimation.cs Partial everything 2022-11-27 00:00:27 +09:00
FailOverlay.cs Partial everything 2022-11-27 00:00:27 +09:00
GameplayClockContainer.cs Partial everything 2022-11-27 00:00:27 +09:00
GameplayClockExtensions.cs Rename GameplayAdjustments -> AdjustmentsFromMods 2022-09-08 17:14:06 +09:00
GameplayMenuOverlay.cs Partial everything 2022-11-27 00:00:27 +09:00
GameplayState.cs Fix TestSceneReplayRecorder not using score provided by gameplay state 2022-07-25 05:21:27 +03:00
HotkeyExitOverlay.cs Partial everything 2022-11-27 00:00:27 +09:00
HotkeyRetryOverlay.cs Partial everything 2022-11-27 00:00:27 +09:00
HUDOverlay.cs Partial everything 2022-11-27 00:00:27 +09:00
IGameplayClock.cs Rename GameplayAdjustments -> AdjustmentsFromMods 2022-09-08 17:14:06 +09:00
ILocalUserPlayInfo.cs Automated #nullable processing 2022-06-17 16:37:17 +09:00
KeyCounter.cs Partial everything 2022-11-27 00:00:27 +09:00
KeyCounterAction.cs Partial everything 2022-11-27 00:00:27 +09:00
KeyCounterDisplay.cs Partial everything 2022-11-27 00:00:27 +09:00
KeyCounterKeyboard.cs Partial everything 2022-11-27 00:00:27 +09:00
KeyCounterMouse.cs Partial everything 2022-11-27 00:00:27 +09:00
MasterGameplayClockContainer.cs Partial everything 2022-11-27 00:00:27 +09:00
OffsetCorrectionClock.cs Split OffsetCorrectionClock out of MasterGameplayClockContainer 2022-08-18 18:54:10 +09:00
PauseOverlay.cs Partial everything 2022-11-27 00:00:27 +09:00
Player.cs Partial everything 2022-11-27 00:00:27 +09:00
PlayerConfiguration.cs Ensure gameplay leaderboard hides with rest of HUD when it should 2022-09-13 18:45:11 +09:00
PlayerLoader.cs Partial everything 2022-11-27 00:00:27 +09:00
ReplayPlayer.cs Fix multiple instances of last hitobject time being calculated incorrectly 2022-12-01 18:04:06 +09:00
ReplayPlayerLoader.cs Partial everything 2022-11-27 00:00:27 +09:00
ResumeOverlay.cs Partial everything 2022-11-27 00:00:27 +09:00
RoomSubmittingPlayer.cs Partial everything 2022-11-27 00:00:27 +09:00
SaveFailedScoreButton.cs Partial everything 2022-11-27 00:00:27 +09:00
ScreenSuspensionHandler.cs Partial everything 2022-11-27 00:00:27 +09:00
ScreenWithBeatmapBackground.cs Partial everything 2022-11-27 00:00:27 +09:00
SkipOverlay.cs Partial everything 2022-11-27 00:00:27 +09:00
SoloPlayer.cs Partial everything 2022-11-27 00:00:27 +09:00
SoloSpectator.cs Merge branch 'master' into update-framework 2022-11-26 16:19:36 +01:00
SoloSpectatorPlayer.cs Partial everything 2022-11-27 00:00:27 +09:00
SpectatorPlayer.cs Partial everything 2022-11-27 00:00:27 +09:00
SpectatorPlayerLoader.cs Partial everything 2022-11-27 00:00:27 +09:00
SpectatorResultsScreen.cs Partial everything 2022-11-27 00:00:27 +09:00
SquareGraph.cs Partial everything 2022-11-27 00:00:27 +09:00
SubmittingPlayer.cs Ensure score submission attempt completion before notifying spectator server when exiting play early 2022-12-21 22:23:26 +01:00