ppy / osu-web

the browser-facing portion of osu!
https://osu.ppy.sh
GNU Affero General Public License v3.0
971 stars 380 forks source link

Incorrect `max_combo` in API response #10840

Open respektive opened 8 months ago

respektive commented 8 months ago

On certain maps, the max_combo value in the API response doesn't match the highest combo achieved in FC/SS scores on the leaderboards.

Examples:

  1. Map 1

    • API max_combo: 584
    • Actual combo from FC/SS scores: 571
    • Example Score
  2. Map 2

    • API max_combo: 383
    • Actual combo from FC/SS scores: 378
    • Example Score

This issue is not limited to these maps; it's observed on multiple maps. The max_combo values in the API response seem to be consistently higher than the highest combo achieved on the leaderboards.

respektive commented 7 months ago

Just came across this map, as a more extreme example, with a max_combo of 1. https://osu.ppy.sh/beatmapsets/1963631#osu/4069867

Jayyhk commented 7 months ago

Found an example of another. Map is oddly enough also from 2023 like the others you mentioned. Perhaps this issue is only occurring with more recent maps? Cannot say for sure.

Map

respektive commented 5 months ago

So I noticed something interesting here. The issue only exists on endpoints that return a beatmap object. When sending a request to /beatmaps/{beatmap}/attributes, which returns a beatmap difficulty attributes object, the max_combo in the response is correct. I also went ahead and downloaded a recent dump from https://data.ppy.sh/ and ran some queries on the tables in there. Selecting the max_combo from the osu_beatmaps table with a query like this would result in an incorrect value.

SELECT max_combo FROM osu_beatmaps WHERE beatmap_id = 4069867;

Selecting the value from the osu_beatmap_difficulty_attribs table with a query like this however would show the correct max_combo value.

SELECT value FROM osu_beatmap_difficulty_attribs WHERE mode = 0 AND attrib_id = 9 AND mods = 0 AND beatmap_id = 4069867;

I hope this can help identifying the origin of this issue, so this can be fixed soon.

Also of note: I have tested this with the maps linked in this thread, but this seems to happen on a lot more maps than I thought. Counting the rows where the max_combo from the osu_beatmaps table does not match the value in the osu_beatmap_difficulty_attribs gave me a count of 6,728.