funky-eyes commented on issue #7690: URL: https://github.com/apache/incubator-seata/issues/7690#issuecomment-3414348043
为什么拿到旧链接一定会是被end过的?假设connection.setautocommit(false) 开启事务,然后有一个耗时很长的sql,或者业务逻辑,此时TC触发这个全局事务的超时回滚,进行下发的该RM,从RM拿到被hold的连接进行rollback,由于没有end只会失败,怎么会成功呢? Why would obtaining the old connection necessarily mean end() has already been called? Suppose you call connection.setAutoCommit(false) to start a transaction, and then a long-running SQL statement or business logic is running. If the TC triggers a global transaction timeout and issues a rollback to the RM, the RM will take the held connection and call rollback. Without calling end() first the rollback would fail — how could it possibly succeed? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
