osuAkatsuki / bancho.py

An osu! server for the generic public, optimized for maintainability in modern python
https://akatsuki.gg
MIT License
201 stars 125 forks source link

feat: add score status recalculation to recalc.py #573

Open minisbett opened 4 months ago

minisbett commented 4 months ago

Describe your changes

Added a third re-calculation that re-evaluates the status of all non-failed scores (status>0)

The new re-calculation is important to perform when PP is being updated, but might also be desired to run isolated from PP re-calculation. For all (map_md5, userid, mode) pairs it'll find the best score of the user (which is determined by PP in bpy) and sets the status to 2. The status of all other non-failed scores on that map are set to 1.

Discussing necessary before merge The re-calculation of statuses is necessary since after the update of PP a score which was previously considered the best score by a user on a map might no longer be the best and replaced by a different, simply submitted (status=1) score. In order to account for this, we would need to not only re-calculate all status=2 scores, but also all status=1 scores. This would introduce a significantly higher time consumption for running the script.

For my 12-day old server, I currently have 54,346 scores with status=2 and 73,475 scores with status>=1, out of 305,761 total scores. That's an increase of around 35%, but will increase as time goes on as users will start playing the same maps more causing more submitted, but not best scores.

Checklist

cmyui commented 4 months ago
  1. The description attribute from argparse is now called help and has been renamed.

Could you link documentation for this? Py docs still show description: https://docs.python.org/3.11/library/argparse.html

I find it kinda unlikely python would make a breaking change for this, but perhaps?

minisbett commented 4 months ago
  1. The description attribute from argparse is now called help and has been renamed.

Could you link documentation for this? Py docs still show description: https://docs.python.org/3.11/library/argparse.html

I find it kinda unlikely python would make a breaking change for this, but perhaps?

I was looking at https://docs.python.org/3/library/argparse.html, which seems to have been correct for me. image Also this python version is what I used to run, right inside the banchopy docker container.

NiceAesth commented 4 months ago

cherrypicked the fixes from this PR into #587 #588

please keep pr goals singular and separate them when necessary

GamebP commented 4 months ago

merging this can make fake data work. Am i correct?

minisbett commented 4 months ago

merging this can make fake data work. Am i correct?

Fake data works without this. What you are trying to do is just not what you use fake data for.