We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
我查看到代码
AbstractSoftTransaction#beginInternal中 previousAutoCommit = connection.getAutoCommit(); connection.setAutoCommit(true);
这里的设置为自动提交模式是什么意思? 我查看过SoftTransactionTest#bedSoftTransactionTest 这里的conn对象为实际执行业务语句的对象,这里反而设置为自动提交模式,不就是让业务代码自动提交了.那业务中的事务回滚如何处理?
同时,在best事务实现中,以下代码:
conn = bedSoftTransaction.getConnection().getConnection(event.getDataSource(), SQLStatementType.SELECT); if (!isValidConnection(conn)) { conn = bedSoftTransaction.getConnection(); isNewConnection = true; }
这里本意是新开连接, 如何体现出来? 由于 ShardingConnection#connectionMap对象的存在,这里将conn回到shardconn并不会导致连接被重建 按照sql标准来说,如果原连接本身不可用(如网络中断),则应该直接中断事务,而不是重试.因为原来的连接中执行的代码本身就被破坏了.
The text was updated successfully, but these errors were encountered:
这是两个问题: 1.对于autocommit强制设置为true的意思是:柔性事务是一个事务框架,对于bed来说就是重试,所以设置为true是合理的,对于tcc来说,try confirm 和 cancel每一步都是一句sql,且执行完成就需要提交。故这里设置autocommit为true;
2.第二个确实是个bug,感谢!
Sorry, something went wrong.
@hanahmily, 这个BUG下个版本(1.3.2)能否修复啊
ec657f6
No branches or pull requests
我查看到代码
这里的设置为自动提交模式是什么意思?
我查看过SoftTransactionTest#bedSoftTransactionTest
这里的conn对象为实际执行业务语句的对象,这里反而设置为自动提交模式,不就是让业务代码自动提交了.那业务中的事务回滚如何处理?
同时,在best事务实现中,以下代码:
这里本意是新开连接, 如何体现出来? 由于 ShardingConnection#connectionMap对象的存在,这里将conn回到shardconn并不会导致连接被重建
按照sql标准来说,如果原连接本身不可用(如网络中断),则应该直接中断事务,而不是重试.因为原来的连接中执行的代码本身就被破坏了.
The text was updated successfully, but these errors were encountered: