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

Add verify step to confirm correct ranked flag #253

Merged
merged 2 commits into from
Apr 15, 2024

Conversation

peppy
Copy link
Sponsor Member

@peppy peppy commented Apr 10, 2024

For reasons I cannot fathom, some imported scores have ranked set to zero. These look to be older imports, and new cases are not showing up, so let's just fix those and call it a day.

This assumes that if a score still exists in osu_scores_high then it is valid for leaderboards.

Closes #252 (already ran on the affected score; running over all scores overnight).

@@ -188,6 +189,13 @@ public async Task<int> OnExecuteAsync(CancellationToken cancellationToken)
sqlBuffer.Append($"UPDATE scores SET pp = {importedScore.HighScore.pp.ToString() ?? "NULL"} WHERE id = {importedScore.id};");
}

if (!check(importedScore.id, "ranked", importedScore.ranked, true))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this implicitly assumes that every score in the high tables is automatically ranked, but what about the hidden flag in those tables? Are we handling that elsewhere already? I don't think we are, or at least I can't see it happening in code...

Copy link
Sponsor Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hidden is exclusively used for restricted users, which is handled as part of the ES indexing step these days. So for the time being we do just import these scores to the new table with no consideration of the flag, and leave that to es indexer to get right.

@bdach bdach merged commit bcb42e0 into ppy:master Apr 15, 2024
3 checks passed
@peppy peppy deleted the verify-ranked-state branch May 8, 2024 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging this pull request may close these issues.

Some stable scores are missing from leaderboards
2 participants