MongoDB problem
ChefMC opened this issue ยท 4 comments
Description
I using MongoDB as permissions storage and after any re-importing of database all permissions are not working. I even can't connect server. If I removing MondoDB LuckPerms database and LuckPerms plugin creating it's database by itself and I configuring permissions again (from scratch), all working fine again. So I can't migrate my database and I required to recreate it from scratch again.
Reproduction Steps
- Export MongoDB database to .js file dump.
- Remove database
- Import dump from step 1 again to MongoDB. All tables are fine. But Permissions are broken and LuckPerms plugin should create it's database by itself
Expected Behaviour
All should work fine
Server Details
Velocity 3.2 and latest Paper
LuckPerms Version
v5.4.102
Logs and Configs
No response
Extra Details
No response
You'll need to be more descriptive as to what "permissions are broken" means. Additionally, please provide full console logs.
While it shouldn't matter in this case, "latest" is not a version. If asked for a version of something, please provide an actual version number.
- LuckPerms v5.4.102
- Velocity v3.2
- Paper fork
SlimeWorldManager version git-SlimeWorldManager-15259 (MC: 1.20.1) (Implementing API version 1.20-R0.1-SNAPSHOT) (Git: 51c5638 on paper_upstream)
- I dumped LuckPerms database to file
LuckPerms.js
(Pastebin). - Deleted LuckPerms database
- Created new LuckPerms database
- Executed dumped file
LuckPerms.js
and make sure that all tables (collections) with permissions were imported
Then I tried to join Velocity server and was unable to goto backend (Paper) server due to this error:
Velocity log:
[21:58:24] [Netty NIO Worker #0/INFO] [limboapi]: Bl_ckBuster (/127.0.0.1:54765) has connected to the LimboFilter Limbo
[21:58:24] [Netty NIO Worker #0/INFO] [limbofilter]: [connected player] Bl_ckBuster (/127.0.0.1:54765) has client brand vanilla
[21:58:30] [Netty NIO Worker #0/INFO] [limboapi]: Bl_ckBuster (/127.0.0.1:54765) has disconnected from the LimboFilter Limbo
[21:58:30] [LuckPerms - Task Executor #7/ERROR] [luckperms]: Exception occurred whilst loading data for 7251d74e-8608-3364-9c78-d9886d89b3dc - Bl_ckBuster
java.util.concurrent.CompletionException: java.lang.IllegalArgumentException: Unknown id type: me.lucko.luckperms.lib.bson.types.Binary
at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315) ~[?:?]
at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320) ~[?:?]
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1770) ~[?:?]
at com.velocitypowered.proxy.scheduler.VelocityScheduler$VelocityTask.lambda$run$0(VelocityScheduler.java:285) ~[velocity.jar:3.2.0-SNAPSHOT (git-19abb909-b265)]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
at java.lang.Thread.run(Thread.java:833) [?:?]
Caused by: java.lang.IllegalArgumentException: Unknown id type: me.lucko.luckperms.lib.bson.types.Binary
at me.lucko.luckperms.common.storage.implementation.mongodb.MongoStorage.getDocumentId(MongoStorage.java:610) ~[?:?]
at me.lucko.luckperms.common.storage.implementation.mongodb.MongoStorage.savePlayerData(MongoStorage.java:560) ~[?:?]
at me.lucko.luckperms.common.storage.Storage.lambda$savePlayerData$21(Storage.java:267) ~[?:?]
at me.lucko.luckperms.common.storage.Storage.lambda$future$0(Storage.java:86) ~[?:?]
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?]
... 4 more
Paper log:
Dropbox (22 Mb of LuckPerms spam)
If I removing my imported LuckPerms database to recreate it by LuckPerms itself from scratch, all working fine
Also can you tell which DBMS is more optimal for permissions storage? Maybe MySQL is faster? Do you have stress-testing benchmarks in comparison of different storage types?