在seata升级为1.6.0版本后,操作insert进行数据新增时报出了异常:ShouldNeverHappenException: pkIndex is not found,即insert找不到主键,但主键是存在的,并设置了默认值,造成该原因是seata:1.6.0版本存在的bug,已在1.7.0版本做了修复
详情见:这里
io.seata.common.exception.ShouldNeverHappenException: pkIndex is not found
at io.seata.rm.datasource.exec.BaseInsertExecutor.parsePkValuesFromStatement(BaseInsertExecutor.java:142) ~[seata-all-1.6.1.jar:1.6.1]
at io.seata.rm.datasource.exec.postgresql.PostgresqlInsertExecutor.getPkValuesByColumn(PostgresqlInsertExecutor.java:70) ~[seata-all-1.6.1.jar:1.6.1]
at io.seata.rm.datasource.exec.postgresql.PostgresqlInsertExecutor.getPkValues(PostgresqlInsertExecutor.java:65) ~[seata-all-1.6.1.jar:1.6.1]
at io.seata.rm.datasource.exec.BaseInsertExecutor.afterImage(BaseInsertExecutor.java:78) ~[seata-all-1.6.1.jar:1.6.1]
at io.seata.rm.datasource.exec.AbstractDMLBaseExecutor.executeAutoCommitFalse(AbstractDMLBaseExecutor.java:98) [seata-all-1.6.1.jar:1.6.1]
at io.seata.rm.datasource.exec.AbstractDMLBaseExecutor.lambda$executeAutoCommitTrue$2(AbstractDMLBaseExecutor.java:137) [seata-all-1.6.1.jar:1.6.1]
at io.seata.rm.datasource.ConnectionProxy$LockRetryPolicy.doRetryOnLockConflict(ConnectionProxy.java:356) ~[seata-all-1.6.1.jar:1.6.1]
at io.seata.rm.datasource.exec.AbstractDMLBaseExecutor$LockRetryPolicy.execute(AbstractDMLBaseExecutor.java:180) ~[seata-all-1.6.1.jar:1.6.1]
at io.seata.rm.datasource.exec.AbstractDMLBaseExecutor.executeAutoCommitTrue(AbstractDMLBaseExecutor.java:136) [seata-all-1.6.1.jar:1.6.1]
at io.seata.rm.datasource.exec.AbstractDMLBaseExecutor.doExecute(AbstractDMLBaseExecutor.java:82) [seata-all-1.6.1.jar:1.6.1]
......