apache / apache/incubator-seata
process connectionProxy commit error: null
- Dominant language
- Java
- Stars
- 26k
- Forks
- 8.8k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 4
Description
## version
seata-spring-boot-starter:1.3.0
sharding-transaction-base-seata-at :4.1.0
sharding-jdbc-spring-boot-starter:4.1.1
## run application method log
2020-11-02 20:52:51.030 [DubboServerHandler-10.198.75.60:20002-thread-3] DEBUG c.m.s.mapper.UserSequenceMapper.updateUserSequence Line:159 - ==> Preparing: update t_user_sequence set user_sequence = ? where user_id = ?
2020-11-02 20:52:51.031 [DubboServerHandler-10.198.75.60:20002-thread-3] DEBUG c.m.s.mapper.UserSequenceMapper.updateUserSequence Line:159 - ==> Parameters: 123(Long), 2(Long)
2020-11-02 20:52:51.268 [DubboServerHandler-10.198.75.60:20002-thread-3] WARN i.s.rm.datasource.exec.mysql.MySQLInsertExecutor Line:132 - Fail to get auto-generated keys, use 'SELECT LAST_INSERT_ID()' instead. Be cautious, statement could be polluted. Recommend you set the statement to return generated keys.
2020-11-02 20:52:51.268 [DubboServerHandler-10.198.75.60:20002-thread-3] WARN i.s.rm.datasource.exec.mysql.MySQLInsertExecutor Line:146 - Fail to reset ResultSet cursor. can not get primary key value
2020-11-02 20:52:56.532 [DubboServerHandler-10.198.75.60:20002-thread-3] ERROR io.seata.rm.datasource.ConnectionProxy Line:224 - process connectionProxy commit error: null
java.lang.NullPointerException: null
at org.apache.shardingsphere.transaction.base.seata.at.SeataATShardingTransactionManager.commit(SeataATShardingTransactionManager.java:110)
at org.apache.shardingsphere.shardingjdbc.jdbc.core.connection.ShardingConnection.commit(ShardingConnection.java:155)
at io.seata.rm.datasource.ConnectionProxy.processGlobalTransactionCommit(ConnectionProxy.java:222)
at io.seata.rm.datasource.ConnectionProxy.doCommit(ConnectionProxy.java:196)
at io.seata.rm.datasource.ConnectionProxy.lambda$commit$0(ConnectionProxy.java:184)
at io.seata.rm.datasource.ConnectionProxy$LockRetryPolicy.execute(ConnectionProxy.java:289)
at io.seata.rm.datasource.ConnectionProxy.commit(ConnectionProxy.java:183)
at io.seata.rm.datasource.exec.AbstractDMLBaseExecutor.lambda$executeAutoCommitTrue$0(AbstractDMLBaseExecutor.java:112)
Contributor guide
Research direction
Reproduce the reported commit failure with the listed Seata, ShardingSphere, and Spring Boot starter versions, then start at SeataATShardingTransactionManager.commit and the preceding MySQLInsertExecutor warnings. Trace the null value through ShardingConnection.commit and ConnectionProxy; done means the reported transaction no longer ends with the NullPointerException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100