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

Don't cache invalid/missing difficulty attributes #286

Merged
merged 11 commits into from
Oct 29, 2024

Conversation

smoogipoo
Copy link
Contributor

@smoogipoo smoogipoo commented Oct 28, 2024

Sorry this took so long... Tests were hard to make.

As mentioned in #282 (comment), and has now popped up in practice: https://discord.com/channels/188630481301012481/380598781432823815/1300484977992929443 .

Errors will be something like...

osu.Server.Queues.ScoreStatisticsProcessor.Stores.DifficultyAttributesMissingException: DifficultyAttributeKey { BeatmapId = 1, RulesetId = 0, ModValue = 0 }
 ---> System.Collections.Generic.KeyNotFoundException: The given key '9' was not present in the dictionary.
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at osu.Game.Rulesets.Difficulty.DifficultyAttributes.FromDatabaseAttributes(IReadOnlyDictionary`2 values, IBeatmapOnlineInfo onlineInfo)

Also removed the Length == 0 case, will be handled the same as the other
case. Probably better this way to not cause confusion as they're
technically similar causes, except in one case it may indicate that
diffcalc hasn't run _at all_ so it may underline a deeper issue.
Doesn't help that my file is all red due to SQL datasource errors :D.
@pull-request-size pull-request-size bot added size/L and removed size/M labels Oct 28, 2024
@peppy peppy self-requested a review October 29, 2024 07:46
@peppy peppy merged commit 678e4dd into ppy:master Oct 29, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants