Skip to content

Commit

Permalink
Do not reprocess ranks for custom rulesets
Browse files Browse the repository at this point in the history
Chances are that because we've broken rank API, it would utterly fail
for all custom rulesets anyhow.
  • Loading branch information
bdach committed Jan 23, 2024
1 parent 0b5be3c commit 6c169e3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion osu.Game/Database/BackgroundDataStoreProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,10 @@ private void upgradeScoreRanks()
HashSet<Guid> scoreIds = realmAccess.Run(r => new HashSet<Guid>(
r.All<ScoreInfo>()
.Where(s => s.TotalScoreVersion < LegacyScoreEncoder.LATEST_VERSION)
.AsEnumerable() // need to materialise here as realm cannot support `.Select()`.
.AsEnumerable()
// must be done after materialisation, as realm doesn't support
// filtering on nested property predicates or projection via `.Select()`
.Where(s => s.Ruleset.IsLegacyRuleset())
.Select(s => s.ID)));

Logger.Log($"Found {scoreIds.Count} scores which require rank upgrades.");
Expand Down

0 comments on commit 6c169e3

Please sign in to comment.