`I` Gates Can Conflict
Pheotis opened this issue ยท 3 comments
Bug Description
I
gates can be identical to the same gate created on another server.
Reproduction Steps
On Server1:
Gate1
Gate2
username
i
On Server2:
Gate1
Gate2
username
i
Desired Behaviour
This situation should be prevented.
Observed Behaviour
[WARN]: [Stargate] org.sgrewritten.stargate.exception.database.StorageWriteException: java.sql.SQLIntegrityConstraintViolationException: Duplicate entry 'Example-pheotis' for key 'PRIMARY'
at Stargate-1.0.0.16-NIGHTLY-3.jar//org.sgrewritten.stargate.database.SQLDatabase.savePortalToStorage(SQLDatabase.java:166)
at Stargate-1.0.0.16-NIGHTLY-3.jar//org.sgrewritten.stargate.network.StargateNetworkManager$3.run(StargateNetworkManager.java:254)
at Stargate-1.0.0.16-NIGHTLY-3.jar//org.sgrewritten.stargate.thread.task.StargateTask.runTask(StargateTask.java:101)
at Stargate-1.0.0.16-NIGHTLY-3.jar//org.sgrewritten.stargate.thread.task.StargateQueuedAsyncTask.lambda$runNow$0(StargateQueuedAsyncTask.java:30)
at Stargate-1.0.0.16-NIGHTLY-3.jar//org.sgrewritten.stargate.thread.task.StargateQueuedAsyncTask.cycleThroughAsyncQueue(StargateQueuedAsyncTask.java:75)
at Stargate-1.0.0.16-NIGHTLY-3.jar//org.sgrewritten.stargate.thread.task.StargateQueuedAsyncTask$3.run(StargateQueuedAsyncTask.java:66)
at Stargate-1.0.0.16-NIGHTLY-3.jar//org.sgrewritten.stargate.thread.task.StargateTask.runTask(StargateTask.java:101)
at Stargate-1.0.0.16-NIGHTLY-3.jar//org.sgrewritten.stargate.thread.task.StargateAsyncTask.lambda$runNow$1(StargateAsyncTask.java:21)
at Stargate-1.0.0.16-NIGHTLY-3.jar//org.sgrewritten.stargate.thread.task.StargateBukkitRunnable.run(StargateBukkitRunnable.java:13)
at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:101)
at org.bukkit.craftbukkit.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57)
at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.sql.SQLIntegrityConstraintViolationException: Duplicate entry 'Personal8-pheotis' for key 'PRIMARY'
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:118)
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:912)
at com.mysql.cj.jdbc.ClientPreparedStatement.execute(ClientPreparedStatement.java:354)
at Stargate-1.0.0.16-NIGHTLY-3.jar//com.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44)
at Stargate-1.0.0.16-NIGHTLY-3.jar//com.zaxxer.hikari.pool.HikariProxyPreparedStatement.execute(HikariProxyPreparedStatement.java)
at Stargate-1.0.0.16-NIGHTLY-3.jar//org.sgrewritten.stargate.database.SQLDatabase.savePortalToStorage(SQLDatabase.java:139)
at Stargate-1.0.0.16-NIGHTLY-3.jar//org.sgrewritten.stargate.network.StargateNetworkManager$3.run(StargateNetworkManager.java:254)
at Stargate-1.0.0.16-NIGHTLY-3.jar//org.sgrewritten.stargate.thread.task.StargateTask.runTask(StargateTask.java:101)
at Stargate-1.0.0.16-NIGHTLY-3.jar//org.sgrewritten.stargate.thread.task.StargateQueuedAsyncTask.lambda$runNow$0(StargateQueuedAsyncTask.java:30)
at Stargate-1.0.0.16-NIGHTLY-3.jar//org.sgrewritten.stargate.thread.task.StargateQueuedAsyncTask.cycleThroughAsyncQueue(StargateQueuedAsyncTask.java:75)
at Stargate-1.0.0.16-NIGHTLY-3.jar//org.sgrewritten.stargate.thread.task.StargateQueuedAsyncTask$3.run(StargateQueuedAsyncTask.java:66)
at Stargate-1.0.0.16-NIGHTLY-3.jar//org.sgrewritten.stargate.thread.task.StargateTask.runTask(StargateTask.java:101)
at Stargate-1.0.0.16-NIGHTLY-3.jar//org.sgrewritten.stargate.thread.task.StargateAsyncTask.lambda$runNow$1(StargateAsyncTask.java:21)
at Stargate-1.0.0.16-NIGHTLY-3.jar//org.sgrewritten.stargate.thread.task.StargateBukkitRunnable.run(StargateBukkitRunnable.java:13)
at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:101)
at org.bukkit.craftbukkit.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57)
at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1583)
[Stargate] Gate created on pheotis network!
Trace Logs
Latest core, latest paper, latest velocity, via mariadb on windows.
Other Information
No response
What protocol were you using for ip forwarding, maybe that changes something?
I use legacy at the moment
Comes directly as a cause from #366
Edit, nope that issue was invalid