Data Reset
Bennyboy1695 opened this issue ยท 4 comments
Describe the bug
When theres a lot of backpacks (example: a server with lots of users with 1+backpack) the file becomes too large and has a chance to reset itself. Not sure what the limit is, but my server just had reset after reaching about 8thousand kb in size.
To Reproduce
Steps to reproduce the behavior:
- Create lots of backpacks with a decent amount of data.
2.Wait for reset
Versions
sophisticatedbackpacks-1.16.4-2.2.7.222
I believe this can simply be solved by not storing every players bags in the same file. Maybe separate them by player
https://drive.google.com/file/d/1d8L9uV1Pj2lWd6m1JBU43__-3iypOVH6/view
Github wouldn't allow me to upload it straight here. But thats from the latest backup we had before it reset. So im not sure if something added after caused it to reset or something. But the modpack its from is Stacia Expert v:1.9.7.3
That file seems to be already corrupted (at least mc isn't able to load it because of unexpected end of the file). So it appears to not have saved correctly. I have checked the code that's used to handle the data and it seems to use just default java functionality for handling and zipping files so that should be able to work with much larger files.
Still this file should be nowhere that big so if you can find an older backup from when it worked I would like to take a look at what data is in there.
Also if you have a track of when you last updated sophisticated backpacks and from what version that may help as well. There used to be a bug where mobs with backpacks would cause data to be added to this file and not removed when they despawned, but that was fixed more than a month ago. So it's possible this could have been the culprit of this big size on the other hand Stacia seems to update pretty frequently so assuming they update SBP as frequently as well that shouldn't be making such a big hit here.
would you be able to share the sophisticatedbackpacks.dat file before it was reset? I feel like there's some other bug happening here or something is seriously messing with data because in the world where I am testing backpacks and thus creating lots of them I will get up to something like 10 kb or so of data.
I have found an issue in logic that's supposed to cleanup backpack data after dead mobs who wore them. it's fixed in the latest release on curseforge and there's also a new command that can help with cleaning up this unnecessary data, just read the notes in changelog if you would like to use it for more info.