Skip to content

Commit 28c4b8e

Browse files
committed
Only run on beatmaps with more than one user score
1 parent 97f8dd3 commit 28c4b8e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

osu.Server.Queues.ScoreStatisticsProcessor/Commands/Maintenance/MarkNonPreservedScoresCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ private async Task processUser(MySqlConnection db, int userId, CancellationToken
7171
if (Verbose) Console.WriteLine("Fetching scores..");
7272

7373
IEnumerable<SoloScore> scores = await db.QueryAsync<SoloScore>(new CommandDefinition(
74-
"SELECT id, beatmap_id, ranked, data, total_score, legacy_total_score, pp FROM scores WHERE preserve = 1 AND user_id = @userId AND ruleset_id = @rulesetId",
74+
"SELECT id, beatmap_id, ranked, data, total_score, legacy_total_score, pp FROM scores WHERE preserve = 1 AND user_id = @userId AND ruleset_id = @rulesetId and beatmap_id in (SELECT beatmap_id FROM scores WHERE preserve = 1 AND user_id = @userId AND ruleset_id = @rulesetId GROUP BY beatmap_id HAVING count(id) > 1)",
7575
parameters, cancellationToken: cancellationToken));
7676

7777
if (!scores.Any())

0 commit comments

Comments
 (0)