Jump to content

SaFiKiK

Member
  • Posts

    2
  • Joined

  • Last visited

SaFiKiK's Achievements

Lurker

Lurker (1/6)

1

Reputation

  1. I would like the plugin Plan | Player Analytics to be added to Minehut. Plan is a great all-in-one plugin which collects lots of different data from your server. It helps a lot to do the data processing to understand which activities people like the most (Data Science = good), what they actually do at the server and it just looks cool SpigotMC Link: https://www.spigotmc.org/resources/plan-player-analytics.32536/
  2. I would like the plugin SQLibrary to be added to Minehut. This plugin is needed for Skript to enable the "SQLite" database types. It is a potential big improvement for servers which aren't able to afford high uptime dedicated storage servers to use MySQL. CSV storage type has a big flaw - race condition, MySQL - price and possible crashes due to networking issues. 1) Single CSV Database - For servers with a few millions of Variables Skript creates a tmp CSV file from which it takes variables and then puts them into the CSV file in an aplhabetical order. These operations take lots of time and they also lock the main server thread while all of the changed variables are sorted. Sometimes too many changes are made in the 5-minute period and the server just stutters leading to player mass kicks. 2) Multiple CSV Databases - In order to reduce the main thread locks it's logical that you just need to split the one database into multiple. There goes this big flaw - race condition. When a ton of updates are made and they will more likely be linked to different databases - Skript runs into the problem when it creates only one .tmp file (https://github.com/SkriptLang/Skript/blob/2497729601fb66e47051e1e12b44b886c6a6a5c3/src/main/java/ch/njol/skript/variables/FlatFileStorage.java#L377) for all of the databases and then runs an async save. While one database is saving variables, the others run into the problem where they pass the file lock check because of async (and the lock operation not being "instant"), but it's already actually locked by the other thread. It leads to IOExceptions and variables not being saved > increasing the .tmp variables file size to infinity and eventually locking the main thread to "sort variables" again. 3) MySQL - First of all, if you do not own the 100% uptime database it will will lead to server crashes whenever Skript will fail to connect to database. It even happens with a super expensive storage servers sometimes. 4) SQLite - It does not sort the variables in alphabetical order. You can use multiple databases and they will not run into any race conditions due to the fact they aren't using the .tmp file. Having this database in local storage shouldn't lead to Skript being unable to connect to database. Hopefully, this is what will solve the problems of "mass kicks" which you have definitely seen and got reported many times. You didn't understand the issue and couldn't debug it, because Skript saving variables is not passed into timings making them seem like that the server has just got a degraded performance for no reason. Plugin link: https://skripttools.net/addons?q=SQLibrary P.S. If the plugin gets rejected, I hope that you are able to implement the localhost MySQL access. Servers run in Docker containers, so it shouldn't be a big of a problem to make independent databases.
×
×
  • Create New...