Ⅰ. Issue Description 1.4.2 升1.5.2 使用mybatis-plus-boot-starter 自用生成的insert插入后发现lock_table主键冲突 debug后发现 lock_table生成的row_key重复 并且对应的brancher_id的undo_log的分支事务生成了一条重复的数据
Ⅱ. Describe what happened
server端主键冲突 ava.sql.BatchUpdateException: Duplicate entry 'jdbc:mysql://dev.db.yelopack.com:3306/dev_yelolife_basicdata^^^t' for key 'PRIMARY' at com.mysql.jdbc.PreparedStatement.executeBatchedInserts(PreparedStatement.java:1607) at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1272) at com.alibaba.druid.pool.DruidPooledPreparedStatement.executeBatch(DruidPooledPreparedStatement.java:565) at io.seata.server.storage.db.lock.LockStoreDataBaseDAO.doAcquireLocks(LockStoreDataBaseDAO.java:368) at io.seata.server.storage.db.lock.LockStoreDataBaseDAO.acquireLock(LockStoreDataBaseDAO.java:186) at io.seata.server.storage.db.lock.DataBaseLocker.acquireLock(DataBaseLocker.java:64) at io.seata.server.lock.AbstractLockManager.acquireLock(AbstractLockManager.java:65) at io.seata.server.session.BranchSession.lock(BranchSession.java:287) at io.seata.server.transaction.at.ATCore.branchSessionLock(ATCore.java:80) at io.seata.server.coordinator.AbstractCore.lambda$branchRegister$0(AbstractCore.java:83) at io.seata.server.storage.db.session.DataBaseSessionManager.lockAndExecute(DataBaseSessionManager.java:191) at io.seata.server.session.SessionHolder.lockAndExecute(SessionHolder.java:365) at io.seata.server.coordinator.AbstractCore.branchRegister(AbstractCore.java:77) at io.seata.server.coordinator.DefaultCore.branchRegister(DefaultCore.java:102) at io.seata.server.coordinator.DefaultCoordinator.doBranchRegister(DefaultCoordinator.java:277) at io.seata.server.AbstractTCInboundHandler$4.execute(AbstractTCInboundHandler.java:184) at io.seata.server.AbstractTCInboundHandler$4.execute(AbstractTCInboundHandler.java:179) at io.seata.core.exception.AbstractExceptionHandler.exceptionHandleTemplate(AbstractExceptionHandler.java:131) at io.seata.server.AbstractTCInboundHandler.handle(AbstractTCInboundHandler.java:179) at io.seata.core.protocol.transaction.BranchRegisterRequest.handle(BranchRegisterRequest.java:136) at io.seata.server.coordinator.DefaultCoordinator.onRequest(DefaultCoordinator.java:511) at io.seata.core.rpc.processor.server.ServerOnRequestProcessor.handleRequestsByMergedWarpMessage(ServerOnRequestProcessor.java:285) at io.seata.core.rpc.processor.server.ServerOnRequestProcessor.onRequestMessage(ServerOnRequestProcessor.java:196) at io.seata.core.rpc.processor.server.ServerOnRequestProcessor.process(ServerOnRequestProcessor.java:123) at io.seata.core.rpc.netty.AbstractNettyRemoting.lambda$processMessage$2(AbstractNettyRemoting.java:281) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.lang.Thread.run(Unknown Source) Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry 'jdbc:mysql://dev.db.yelopack.com:3306/dev_yelolife_basicdata^^^t' for key 'PRIMARY' at sun.reflect.GeneratedConstructorAccessor38.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at com.mysql.jdbc.Util.handleNewInstance(Util.java:389) at com.mysql.jdbc.Util.getInstance(Util.java:372) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:973) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3835) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3771) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2435) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2582) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2535) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1911) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2145) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2081) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2066) at com.mysql.jdbc.PreparedStatement.executeBatchedInserts(PreparedStatement.java:1568) ... 28 common frames omitted
Ⅵ. Environment:- JDK version :
- jdk alibaba 11
- Seata version: 1.5.2
- OS : linux
- Others: