You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No SQL query is ever executed on the primary server thread.
Actual behaviour
Every time BetonQuest.getPlayerData() or BetonQuest.getOfflinePlayerData() is called for a player that is not yet present in the playerDataMap a new PlayerData object is created.
During the creation of that object loadAllPlayerData() is called, which executes SQL queries. As no care was taken for when that method is called, it is used from the primary server thread on many occasions.
Steps to reproduce
Configure a debugger to only break on the primary server thread in the PlayerData constructor.
Start the server and attach the debugger.
Join the server. Order is important, this has to happen after attaching the debugger!
Do some quests until the debugger triggers (the first time your player data is used).
Step through the loadAllPlayerData() and watch the SQL queries execute.
Error, Warning, Exception or Thread Dump
No response
Additional information
No response
The text was updated successfully, but these errors were encountered:
Confirm the following
BetonQuest version information
BetonQuest version: 2.0.0-DEV-331
Server version: git-Paper-386 (MC: 1.18.2)
Hooked into: Citizens (2.0.29-SNAPSHOT (build 2493)), LuckPerms (5.4.9), PlaceholderAPI (2.11.1), ProtocolLib (4.8.0), Vault (1.7.3-b131), WorldEdit (7.2.10-SNAPSHOT+6117-e21ab6a), WorldGuard (7.0.6+1cff55f), mcMMO (2.1.210-SNAPSHOT)
Expected behaviour
No SQL query is ever executed on the primary server thread.
Actual behaviour
Every time
BetonQuest.getPlayerData()
orBetonQuest.getOfflinePlayerData()
is called for a player that is not yet present in theplayerDataMap
a newPlayerData
object is created.During the creation of that object
loadAllPlayerData()
is called, which executes SQL queries. As no care was taken for when that method is called, it is used from the primary server thread on many occasions.Steps to reproduce
loadAllPlayerData()
and watch the SQL queries execute.Error, Warning, Exception or Thread Dump
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: