Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid statistic #144

Open
seema84 opened this issue Oct 20, 2023 · 2 comments
Open

Invalid statistic #144

seema84 opened this issue Oct 20, 2023 · 2 comments

Comments

@seema84
Copy link

seema84 commented Oct 20, 2023

Hey,

With a player list that contains some old data (because players have not been on the server for a long time), I keep very very long console outputs.

Don't know what EntityHorse is
[20:17:14] [ForkJoinPool.commonPool-worker-32/WARN]: Invalid statistic in ./world/stats/uuid.json: Don't know what EntityHorse is
[20:17:14] [ForkJoinPool.commonPool-worker-38/WARN]: Invalid statistic in ./world/stats/uuid.json: Don't know what minecraft:309 is
[20:17:14] [ForkJoinPool.commonPool-worker-38/WARN]: Invalid statistic in ./world/stats/uuid.json: Don't know what minecraft:270 is
[20:17:14] [ForkJoinPool.commonPool-worker-38/WARN]: Invalid statistic in ./world/stats/uuid.json: Don't know what minecraft:38 is

and many more

For example, when I use a top command, the output in the console is really long. Is it intended to be that way?

@Artemis-the-gr8
Copy link
Contributor

Hi!

I think that's what happens if the server tries to read .stat files from older Minecraft versions. It's not a warning that PlayerStats gives, it comes from the server itself. I've seen it myself a couple of times when I put very old .stat files on a 1.18 or 1.19 server, and if I remember correctly it gets triggered any time the server tries to read the old file. I think it's because the phrasing of some things changed, so newer Minecraft versions can't read all the old data properly.

The reason you'll see a lot of it with a top command, is because the top command checks every player's file for a specific stat, which means the server is reading every stat file. What I am curious about, is whether it happens with every top statistic, or only the ones that have a sub-statistic (so the entity, item or block related ones).

If it happens with every statistic, that means the server does some sort of check on whether all statistics in a file are valid every time it's opened. If it only happens with statistics with a sub-statistic, then the warning only happens whenever relevant data needs to be read.

In either case, it has to do with the .stat files themselves, and the only thing you could do is delete the entries in them that are invalid (or rename them to what they are called in 1.20 or whatever version your server is on).

Depending on the amount of files you have, that can be a lot of tedious work though, so you could also choose to ignore the warnings. I don't think they're causing any harm (despite being a lot of spam). The only danger I could think of, is the warnings causing some lag. They're probably not impacting your server performance a lot (or at all), but it's something you could keep an eye on.

@seema84
Copy link
Author

seema84 commented Oct 20, 2023

You are right in your assumptions. I had tested it with the playing time and there were these warnings. I can also do more tests for you.

Do you know a way to automatically update the stats for everyone (which also happens when the player enters the server). And does that make sense at all?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants