Skip to content
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

Store total score without mod multipliers to local database and to replays, and send it on score submission #27912

Merged
merged 7 commits into from
May 10, 2024

Conversation

bdach
Copy link
Collaborator

@bdach bdach commented Apr 17, 2024

RFC. This is supposed to be the start of a series of changes which is an alternative to #27816, and will generally facilitate unconstrained mod multiplier rebalancing without worry of precision or even complete total score loss in the future.

I will continue with further changes if this is accepted, but I generally will not be PRing further changes until I see agreement on this general direction.

General plan

The plan here is as follows:

  1. Ensure the client stores and sends the score without mod multipliers.
  2. Ensure osu-web reads the score without mod multipliers, and stores it. (Up in the air as to exactly how - either new column or in the json blob; new column will require table rebuild, json blob will not but may behave erratically wrt storage requirements. I have a branch that implements the json blob variant.)
  3. After (2) is deployed, write a osu-queue-score-statistics command that will back-populate the pre-mod multiplier total score for rows that do not have it.
  4. Turn off score submission for client versions that are not sending information from (1).
  5. After all of the above, mod multipliers can be arbitrarily rebalanced using another osu-queue-score-statistics command forevermore.

Client considerations

  • Scores already in the database will receive the pre-mod multiplier score via the realm migration. This means that it will run synchronously on startup, but I'm not sure I'm particularly worried about that (migration took ~350ms on a local database with ~7k scores inside).
  • Scores set after this change will have the new property populated as part of the standard operation of Player.
  • Scores imported from stable replays will have the new property populated via the standardised score migration flow.
  • Scores imported from lazer replays recorded after this change will read the new property from the replay.
  • Scores imported from lazer replays recorded before this change but after LegacyReplaySoloScoreInfo was created will have the new property populated inline via a crude estimation.
  • Scores imported from lazer replays recorded before LegacyReplaySoloScoreInfo existed are considered obsolete and unsupported. They will receive a TotalScoreWithoutMods of zero, which means that their total score will likely also zero upon future rebalances.
  • No effort is made to account for past mod multiplier changes. If a replay was set back before ranked play went live and there were some wacky in-flux multipliers active back then, this does nothing to attempt to fix or even detect that.

@bdach bdach added realm deals with local realm database area:scoring labels Apr 17, 2024
@bdach bdach requested a review from a team May 8, 2024 11:43
@peppy peppy self-requested a review May 9, 2024 05:12
@peppy
Copy link
Member

peppy commented May 10, 2024

@bdach i see no reason not to go ahead with this and get it in sooner rather than later. good to move out of draft?

@bdach
Copy link
Collaborator Author

bdach commented May 10, 2024

If you're ok with the plan as outlined in the OP then I see no reason not to.

@bdach bdach marked this pull request as ready for review May 10, 2024 12:57
@peppy peppy merged commit a780abb into ppy:master May 10, 2024
15 of 17 checks passed
@peppy
Copy link
Member

peppy commented May 10, 2024

If you're ok with the plan as outlined in the OP then I see no reason not to.

Apart from storage concerns I believe it sounds fine. And even if not, this initial step can cause no harm (and at very least help with locally saved scores).

@bdach bdach deleted the pre-mod-multiplier-score branch May 14, 2024 10:30
@bdach bdach self-assigned this May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:scoring realm deals with local realm database size/L
Projects
Development

Successfully merging this pull request may close these issues.

3 participants