-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reintroduce score submission retry mechanism #24609
Comments
AFAIK, in stable, scores in the resubmission queue are lost if the game is closed or crashes. How about some sort of protection mechanism against that? This would mean pending scores need to be stored on-disk, which comes with anti-cheat considerations. Not sure if the team feels comfortable with it, but I'll throw it out there. |
out of scope. |
So I've put a little bit of thought into it and have a few thoughts... Adding "retry" itself is not very straightforward, because as is, from a standpoint of a single user, the entire submission process ends up being quite serialised. In stable this wasn't generally an issue, since submission was a one-and-done affair - just a single request. In lazer we have score tokens and then actual submission and then also For a refresher, here's how the current flow looks (lifted from https://github.com/ppy/osu-infrastructure/blob/master/score-submission.md, with irrelevant bits dropped): sequenceDiagram title Score submission flow
participant C as osu!lazer
participant W as osu-web
participant S as osu-spectator-server
participant DB as MySQL
participant S3
C->>+W: Request score submission token (POST /beatmaps/{beatmap_id}/solo/scores)
W->>DB: Store token to solo_score_tokens
W-->>-C: Provide {token_id} (APIScoreToken)
C->>+S: Signal begin play (BeginPlaySession(token_id))
Note over C: Playing beatmap
loop Gameplay
C->>S: Send frame bundle (SendFrameData)
end
Note over C: Finished playing
C->>S: Signal finished (EndPlaySession)
C->>+W: Submit score (PUT /beatmaps/{beatmap_id}/solo/scores/{token_id})
W->>DB: Store score to solo_scores
W-->>-C: Provide {score_id}
par Replay upload
DB-->>S: Found score_id for token (solo_score_tokens.score_id IS NOT NULL)
S->>S3: Upload replay (ScoreUploader.Flush)
S->>-DB: Mark has replay (UPDATE solo_scores SET has_replay = 1)
end
To be more precise, the current situation is:
I have a few ideas what could be done with it but they have sweeping implications... Proposal A: Allow
|
A question I've always had in my mind to begin with: why do we use this replay recording flow with osu-spectator-server instead of just uploading on submission like osu-web? Always seemed over-complicated to me. I'm hugely in favor of proposal C, at least for the time being as we aim to release ranked play with just a few weeks left, and I don't see the architectural issues with osu-spectator-server being solved anytime soon. And as I previously voiced, I don't want to spend my Christmas holidays working on infra again. I am not sure what you mean with the last negative point in that proposal though, I don't think that's an issue. |
Mostly spitballing since I don't have real experience with the infra. If it's not a problem then that's good. |
The idea is that it makes it much harder to fabricate score uploads, and gives us a lot more data points to work with. Plus it uses "spectator" data as the final replay data, which just feels right. This comes at a slight complexity cost and potential reliability cost for users with more flaky internet access. Proposal C would be a hugely incorrect direction IMO.
If you need to do this then something is wrong. If I can't handle infrastructure myself anymore then everything you've changed is a step back and we should reassess. |
I can't recall score uploads being exploited in recent times on stable, wouldn't this be something that's already mitigated enough with AC? Another concern is resources usage. Such a SPOF should have as little responsability and load as possible. There will be inevitable scaling issues as I touched on this on Discord: https://discord.com/channels/90072389919997952/983550677794050108/1144383316523487334
I mean, it's the same thing we touched on with smoogi while we were together at COE. I don't mind doing incident response even during holidays, but if we have to fix stuff, work against architectural decisions at the same time, then we've failed somewhere. And nobody wants to watch the game struggle so I'd still jump in and help, but I'd rather have us plan ahead and not end up in that situation in the first place. |
Does it though? I've considered that, but it felt like a weak argument, since the frames that spectator server receives come from client anyways, and are accepted unquestioned. So I'm not sure that it helps prevent fabrication very much if at all (a rogue client can just report false frames the entire time rather than just at the end). |
Just like the fact we don't have any anti-cheat, these are systems which will be built on.
This is weird. It's already implemented, the proposals here are basically rewriting everything to add a small amount of reliability guarantee. |
I'd say this: Disregarding all discussion above, a first point to address is the ability for a user to reconnect to Once we have this in place, we can decide whether responsibilities need to be shuffled. |
Moving out of the project for now but leaving as p1. We've had very few reports of submission failures (touch wood?). |
Going to tentatively add this to project as stuff like https://twitter.com/reeeooot/status/1752843760935862398 is being talked about. |
if i could add my 2cts, it also happened to me even though i have a pretty stable fiber internet connection i'm down sharing more details on my setup, logs, replay files or anything that could help y'all if needed |
Could you please attach logs? You can export using "Export logs" in settings. |
sure, there you go: compressed-logs.zip |
Type
Game behaviour
Bug description
In case of online outages, stable will retry score submission until success. This is not yet implemented in lazer, so a failed score submission will only fail once and then be lost to the depths of time. Users may understandably not be very happy with that, so we should make sure we have an equivalent (or better) mechanism of handling this.
Screenshots or videos
n/a
Version
current master
Logs
n/a
Tasks
The text was updated successfully, but these errors were encountered: