pdinklag / MinecraftStats

A Minecraft player statistics browser for the web - supports 1.13 and later!
https://discord.gg/brH5PGG8By
Other
228 stars 54 forks source link

Fix indeterministic rankings #30

Closed pdinklag closed 5 years ago

pdinklag commented 5 years ago

Rankings are currently non-deterministic. That is, if the database is updated on the very same data two times, the ranking result may be different.

This is because player data is stored in a hashmap. Players who have the same score for some stat will thus be ordered arbitrarily each time the database is updated, which may cause medals to be distributed differently every time.

Players should get some kind of a monotonic ID that never changes and is used for a final sorting decision, e.g. the GUID.