ppy / osu-infrastructure

40 stars 5 forks source link

Score statistics processor needs to process PP for imported highscores #25

Closed smoogipoo closed 9 months ago

smoogipoo commented 10 months ago

When we deploy lazer for ranking purposes, we need to completely shut down osu-performance and have PP be solely updated by osu-queue-score-statistics. Otherwise, because osu-performance only reads from the legacy tables, it will exclude any scores set in lazer.

But right now all imported highscores bypass osu-queue-score-statistics so it'll miss any scores set in osu!stable.

bdach commented 9 months ago

I started looking into this, but I'm not sure of a few things:

smoogipoo commented 9 months ago

During the import process, should the imported scores be enqueued onto redis for processing, or processed inline?

Will need to confirm with @peppy, because the import process currently has a join on the score_process_queue table exactly for this - to wait for osu-performance calcs so that those are also imported into solo_scores_performance.
But I've already told him that we probably don't need to do that (if it's causing issues elsewhere), and instead run a full pp reprocess - it might just be fast enough to handle it.

For the "watch" mode of the processor, it definitely needs to happen. It should be very little load by that point.

As I understand it, ScorePerformanceProcessor is the one processor that must definitely run for correct operation, but how about UserTotalPerformanceProcessor?

Both need to run because the user total is derived from the score performance. Here's the process I imagine:

Full import:

Post- full import:

Watch mode:

bdach commented 9 months ago

But I've already told him that we probably don't need to do that (if it's causing issues elsewhere), and instead run a full pp reprocess - it might just be fast enough to handle it.

For the "watch" mode of the processor, it definitely needs to happen. It should be very little load by that point.

I'm not sure I follow this part - the way I'm understanding it is that pp processing should be ran both inline during the import process and as items arrive in the queue? That sounds like processing the imported score multiple times which seems wasteful? In what circumstance would an imported score with pp processed inline go through the queues again - is it the version upgrade scenario?

smoogipoo commented 9 months ago

Explained on voice, but it's only the watch mode of the processor that needs to push to the queue.