This is a bug fix and minor feature release - Nucleus 2.2.6 for Sponge API version 7.3
This was built from Nucleus commit: 3bbdd932e
If you’re having trouble, visit our Discord channel: https://discord.gg/A9QHG5H
Nucleus v1 is now UNSUPPORTED. It is recommended that you upgrade to this version as soon as practical. Note that some plugins may not be compatible with Nucleus v2.
For the things YOU need to do as a server owner, please visit our instructions on how to upgrade.
This refers to the command
/nucleus setupperms -g. DO NOT USE THIS FUNCTION IN EARLIER VERSIONS. It basically got the permission group setup backwards.
After some thought, I’ve decided that it’s not worth me having such a function - users should set up the permissions plugins themselves and get comfortable with them.
At long last, I have finally discovered why Nucleus seemed to be rolling back some data.
In order to avoid a lot of data storage operations, I maintain a cache of data. This data can be updated and the idea is that it’ll be saved back during a repeating task. As issues of data rollbacks have been coming to light, I’ve been patching this by saving data as soon as it changes. However, this has inevitably meant that I’ve been patching a lot of places as they’ve come up.
Thanks to a recent report and discussion with Jon#3636 in Discord where it became clear that rollbacks were happening after some time - it was obvious that it was something to do with the cache which has an expiry time of 5 minutes. It eventually led me to a repeating task which saves all the available data in the user data files. It also clears the cache so that any old entries that represent offline players can be removed.
It turns out, however, I was making two mistakes here:
- I was clearing all user data so that it would reload the data from storage, regardless of whether the player was online or not; and
- I was clearing the cache before saving the data.
As a result, any data that was unsaved at the time this task runs got thrown away. Saving the data immediately worked around this issue, but now this should solve it properly.
In future updates, I plan to update the points where I save immediately to be “optional” in config, in that you will either be able to choose to save data immediately upon save which may have performance issues, or use the cache which is saved every five minutes. I will talk about this potential change when the update comes out.
I apologise for any inconvenience caused, and thank you for your understanding.
- Fix data rollback issues in some circumstances
- Avoid using the UserStorageService for player only parameters to try to improve performance on servers that have seen a lot of players join
- Some plugins and mods are known to be incompatible with Nucleus. See https://v2.nucleuspowered.org/docs/compatibility.html for more information.