Skip to content

Solo score processing commands

Dean Herbert edited this page Dec 6, 2022 · 7 revisions

This is a collection of commands which are used for manually importing, migrating and processing scores across MySQL, Redis and Elasticsearch.

Make sure to pull the latest image version before running.

Import high scores from osu_scores_high to solo_scores

This will run over all scores for the specified ruleset and insert any missing rows into solo_scores, solo_scores_performance, solo_scores_legacy_id_map.

  • Does not queue imported scores for elasticsearch indexing (this needs to be performed manually as a follow-up step).
  • Skips over any already-present scores, based on legacy_id_map entries.
  • Runs as fast as possible but rate limits to avoid replication slave latency (based on slave_latency in osu_counts, as reported by web-10)
docker run \
--network=host --rm -it \
-e DB_HOST=db \
-e DB_USER=next \
pppy/osu-queue-score-pump:latest-dev queue import-high-scores -r0

Index incoming lazer-first scores queue

This will watch the score-statistics queue on redis for scores which have completed processing, and queue for elasticsearch indexing.

Currently this is being run manually, but eventually needs to be deployed to kubernetes. Of note, the SCHEMA needs to be specified manually at the moment. This needs to be updated to use GetActiveSchemas().

docker run \
--network=host --rm -it \
-e DB_HOST=db \
-e DB_USER=next \
-e REDIS_HOST=redis \
-e SCHEMA=9 \
pppy/osu-elastic-indexer:latest-dev queue

Re-queue all solo_scores for elasticsearch reindexing

This will iterate over all currently available solo_scores and push them to the score-index-{SCHEMA} redis queue for reindexing.

  • This operates very fast, and as such it is important to have a queue processor in place that can keep up with the queueing. Of note, safeties exist to stop queueing new items after a certain point.
docker run \
--network=host --rm -it \
-e DB_HOST=db \
-e DB_USER=next \
-e REDIS_HOST=redis \
-e SCHEMA=9 \
pppy/osu-elastic-indexer:latest-dev all

Upgrade all solo_scores to the latest computationally correct version

This command reprocesses statically calculated values (currently total_score and accuracy) using the latest formula.

  • Does not queue upgraded scores for elasticsearch indexing (this needs to be performed manually as a follow-up step).
docker run \
--network=host --rm -it \
-e DB_HOST=db \
-e DB_USER=next \
pppy/osu-queue-score-pump:latest-dev queue upgrade-scores