PyvesB / advanced-achievements

:fireworks: Popular plugin that adds unique and challenging achievements to Minecraft servers.
https://www.spigotmc.org/resources/83466
GNU General Public License v3.0
200 stars 211 forks source link

Database Bug #1080

Closed XipsAhoy closed 2 years ago

XipsAhoy commented 2 years ago

🎆 Advanced Achievements version

7.2.4

🖥 Server version

Paper-318 MC:1.17.1

🚰 Spigot username

Ouros29

𝑾 Wiki read

📁 Existing issues

🐛 Description

This error randomly popus up spamming my console!

📄 Server logs

10.10 14:00:58 [Server] ERROR Database write error while batching statistic updates:
10.10 14:00:58 [Server] INFO com.hm.h2.jdbc.JdbcBatchUpdateException: (Message 22001 not found); SQL statement:
10.10 14:00:58 [Server] INFO REPLACE INTO crafts VALUES ('8ca73c92-74a4-49b6-8604-113fcf8a6140', 'smooth_red_sandstone_stairs|end_stone_brick_stairs|stone_stairs|smooth_sandstone_stairs|granite_stairs|andesite_stairs|diorite_stairs|cobblestone_stairs|purpur_stairs|oak_stairs|brick_stairs|stone_brick_stairs|sandstone_stairs|spruce_stairs|birch_stairs|jungle_stairs|crimson_stairs|warped_stairs|acacia_stairs|dark_oak_stairs|blackstone_stairs|red_sandstone_stairs', 20) [22001-200]
10.10 14:00:58 [Server] INFO at com.hm.h2.jdbc.JdbcStatement.executeBatch(JdbcStatement.java:781) ~[AdvancedAchievements.jar:?]
10.10 14:00:58 [Server] INFO at com.hm.achievement.db.AsyncCachedRequestsSender.lambda$sendBatchedRequests$0(AsyncCachedRequestsSender.java:67) ~[AdvancedAchievements.jar:?]
10.10 14:00:58 [Server] INFO at com.hm.achievement.db.SQLWriteOperation.attemptWrites(SQLWriteOperation.java:45) ~[AdvancedAchievements.jar:?]
10.10 14:00:58 [Server] INFO at com.hm.achievement.db.AsyncCachedRequestsSender.sendBatchedRequests(AsyncCachedRequestsSender.java:72) ~[AdvancedAchievements.jar:?]
10.10 14:00:58 [Server] INFO at com.hm.achievement.db.AsyncCachedRequestsSender.run(AsyncCachedRequestsSender.java:44) ~[AdvancedAchievements.jar:?]
10.10 14:00:58 [Server] INFO at org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftTask.run(CraftTask.java:101) ~[patched_1.17.1.jar:git-Paper-318]
10.10 14:00:58 [Server] INFO at org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[patched_1.17.1.jar:git-Paper-318]
10.10 14:00:58 [Server] INFO at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[patched_1.17.1.jar:git-Paper-318]
10.10 14:00:58 [Server] INFO at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) ~[?:?]
10.10 14:00:58 [Server] INFO at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) ~[?:?]
10.10 14:00:58 [Server] INFO at java.lang.Thread.run(Thread.java:831) ~[?:?]
``
[latest.log](https://github.com/PyvesB/advanced-achievements/files/7317363/latest.log)
`

### ⚙ Configuration
PyvesB commented 2 years ago

Hello @XipsAhoy ! 👋🏻

Thanks for reporting this. H2 error code 22001 corresponds to VALUE_TOO_LONG_2. The TableMaxSizeOfGroupedSubcategories basically need to have the expected effect for H2 as well. 😉

XipsAhoy commented 2 years ago

What can I do then?

PyvesB commented 2 years ago

Wait for the next release and increase the value of TableMaxSizeOfGroupedSubcategories to the size of the biggest grouped subcategories :)

XipsAhoy commented 2 years ago

I didn't get it but I will wait for the next release ;). Thanks!