diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/data/storage/MySQLDataHandler.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/data/storage/MySQLDataHandler.kt index 3120eead..471de3aa 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/data/storage/MySQLDataHandler.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/data/storage/MySQLDataHandler.kt @@ -33,7 +33,6 @@ import java.util.UUID import java.util.concurrent.Callable import java.util.concurrent.ConcurrentHashMap import java.util.concurrent.Executors -import java.util.concurrent.Future import java.util.concurrent.TimeUnit /* @@ -172,7 +171,6 @@ private class ImplementedMySQLHandler( private val threadFactory = ThreadFactoryBuilder().setNameFormat("eco-mysql-thread-%d").build() private val executor = Executors.newFixedThreadPool(plugin.configYml.getInt("mysql.threads"), threadFactory) val registeredKeys = ConcurrentHashMap>() - private val currentlyProcessingRegistration = ConcurrentHashMap>() init { transaction { @@ -198,21 +196,11 @@ private class ImplementedMySQLHandler( return } - val future = currentlyProcessingRegistration[key] - - if (future != null) { - future.get() - return - } - - currentlyProcessingRegistration[key] = executor.submit { - transaction { - registerColumn(persistentKey, table) - SchemaUtils.createMissingTablesAndColumns(table, withLogs = false) - } - registeredKeys[key] = persistentKey - currentlyProcessingRegistration.remove(key) + transaction { + registerColumn(persistentKey, table) + SchemaUtils.createMissingTablesAndColumns(table, withLogs = false) } + registeredKeys[key] = persistentKey } fun write(uuid: UUID, key: PersistentDataKey, value: Any) {