Ensure pp
is populated before attempting to import a legacy score
#167
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Should address ppy/osu#25397 (going forward, not existing scores; they will need to be manually fixed or we should just wait until re-importing everything).
Of note, this only works if we assume there is one single instance of
osu-performance
running (so processing is in a consistent incrementing fashion), else we may skip ahead with thelastId = Max()
logic. But we haven't run multipleosu-performance
instances in years so it's probably okay?If we want to support the above case better, the checks would need to be moved out of the SQL query and into actual logic, incrementing
lastId
only to the last processed row, and reprocessing that batch until all are satisfied. Personally don't think it's worth it.Note that I haven't tested this yet, but it's roughly based off existing logic in
osu-performance
(https://github.com/ppy/osu-performance/blob/3d403354321c5e0cd0cd9c9cf587d5b88a0ba78f/src/performance/Processor.cpp#L706-L710).