Shopkeepers removed the save.yml file after diskspace was full.
JamiePlaysTwitch opened this issue ยท 2 comments
Preliminaries:
- Shopkeepers version:
2.12.0
- Spigot version:
CraftBukkit version git-Spigot-379750e-43c7ff9 (MC: 1.16.2) (Implementing API version 1.16.2-R0.1-SNAPSHOT)
- I have checked that my issue/question does not get answered by:
- The documentation.
- The FAQ.
- The Known Issues.
- I have checked all open and closed issues, but none seems to fit my issue/question.
Reproduction on a fresh and up-to-date Spigot server:
I was not able
to reproduce my issue on a freshly setup and up-to-date Spigot server (currently CraftBukkit version git-Spigot-379750e-43c7ff9 (MC: 1.16.2) (Implementing API version 1.16.2-R0.1-SNAPSHOT)``**) with the latest version of Shopkeepers (currently **
2.12.0`), with no other plugins and with no kinds of other server or client mods.
The issue:
Provide a detailed description of your problem and add as much information as possible which could help reproducing the issue.
Include:
- Description of the issue.
- Step-by-step instructions on how to reproduce the issue.
- Observed behavior.
- Expected behavior.
- If items with special attributes are involved: Include instructions on how to create those items.
- Server logs (from server startup until issue). Consider enabling debug mode in the config for additional console output.
- If modified from default: Plugin configurations.
- .. Anything else that might be useful to reproduce and identify the issue.
I run my server on spigot. Today the server had a problem: Disk space full. After I had deleted some servers and unneccesary back-ups, all my shopkeepers were gone. Nothing in the save.yml file, nothing.
I can't reproduce the issue
I added server logs from today.
2020-11-06-1.log
I haven't tested or verified this, but I have made a few changes that should resolve this issue:
- I was previously missing to check an error flag when the new save data is written to file. I changed how this data is written, so this should no longer apply.
- I make sure that the OS flushes its internal file buffers to disk before I replace the old save data with the new data.
References:
Both of these changes should in principle ensure that the old save data is at least not deleted if there is not enough disk space to write the new save data.
The log doesn't mention anything about Shopkeepers, but your other plugins and the server itself is having issues with disk space as well.
I am not sure how to go about this. The old save file should only get removed if the creation of the new save file was successful. I would expect this to catch the disk space error. Without server logs I will probably have to somehow reproduce this in the future to check if this handling logic works as expected. But in either case, a full disk will result in at least new data being lost due to the save failing.
Can you check if you have older server logs from when this issue actually occurred for shopkeepers?
Since your disk space is still full, you could also create a bunch of shopkeepers to reproduce the failing. There is a command /shopkeepers debugCreateShops [shopCount]
to create lots of empty dummy shopkeepers.