Aurora Lahtela
Aurora Lahtela
TODO: Investigate the server information storage of game servers for any inconsistencies
Noted symptoms: - Duplicate servers appear in the database - Game server records data as a new server after restart (Thus previous server is appearing as offline) - Plan reload...
I could not figure why it happens, but I fixed some stuff and logging that could affect it. There is some multi-threading going on that could be do the odd...
Another person had same issue so I reopened this. Any logs with `Registering a new server in database with UUID` are appreciated as that logging was added during previous attempt...
That is very odd.
Okay at it is clear from the log order that the database had not yet completely opened before it decided to register a new server. I'll take a look when...
Just to make sure (I can't remember if I have asked this) - did you delete /plugins/Plan/ServerInfoFile.yml when updating the plugin?
Somebody got this again on discord and their ServerInfoFile.yml cleared for some reason 🤔  
Ok! Now I might have figured out what is happening: Two threads try to write the server details to the file at the same time, but by accident they write...
Here's a dev build of the above commit, I was unable to reproduce the issue still, but this might fix it regardless [Plan-5.4-dev-build-1696.jar.zip](https://github.com/plan-player-analytics/Plan/files/8800126/Plan-5.4-dev-build-1696.jar.zip) [PlanFabric-5.4-dev-build-1696.jar.zip](https://github.com/plan-player-analytics/Plan/files/8800130/PlanFabric-5.4-dev-build-1696.jar.zip)