apache / apache/incubator-seata-samples
io.seata.rm.datasource.undo.UndoLogManager#undo回滚的事务connecion使用完毕是不是应该恢复自动提交
Open
- Dominant language
- Java
- Stars
- 2.4k
- Forks
- 2k
- PR merge metrics
- No merged PRs in 30d
Description
在执行回滚操作时,这个方法中start了一个本地事务,但是这里既然是手动设置的自动提交为false,是不是应该在结束之后在设置为true?
原因:Druid 的连接池中,在执行con.close()时会去将connection的自动提交设置为初始默认值再丢回连接池,但是tomcat jdbc的连接池并不会,所以一旦执行过回滚操作之后,这个connection的autoCommit一直是false,其他线程再使用这个连接就会有问题
Contributor guide
Research direction
Start with io.seata.rm.datasource.undo.UndoLogManager#undo and inspect how the local transaction changes the connection's auto-commit state. Compare the behavior of Druid and Tomcat JDBC connection pools described in the issue. Done means a connection used for rollback does not retain autoCommit=false when returned for later use.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, database
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100