You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@seata.apache.org by "luky116 (via GitHub)" <gi...@apache.org> on 2024/11/23 09:41:14 UTC
[I] [seata-java] XA模式在某些情况下,分支事务已经回滚,但TC仍会重试回滚直到超时 [incubator-seata-go]
luky116 opened a new issue, #709:
URL: https://github.com/apache/incubator-seata-go/issues/709
<!-- Please use this template while reporting a bug and provide as much info as possible. Not doing so may result in your bug not being addressed in a timely manner. Thanks!
-->
refer: https://github.com/apache/incubator-seata/pull/5833
<!-- Please do not use this issue template to report security vulnerabilities but refer to our [security policy](https://github.com/seata/seata/security/policy). -->
- [x] I have searched the [issues](https://github.com/seata/seata/issues) of this repository and believe that this is not a duplicate.
### Ⅰ. Issue Description
XA模式,在执行 `connection.start()` 前,收到 TC 的回滚请求,此时由于分支事务还没开始会回滚失败,然后将分支状态改为 `PhaseTwo_Rollbacked` , 接着执行 start(),此时 termination()方法由于状态是`PhaseTwo_Rollbacked`而抛异常,catch住后,回滚分支事务成功,没有报告给 TC,然后 TC 会一直回滚直到超时
```java
private synchronized void start() throws XAException, SQLException {
...
try {
termination();
} catch (SQLException e) {
// the framework layer does not actively call ROLLBACK when setAutoCommit throws an SQL exception
xaResource.end(this.xaBranchXid, XAResource.TMFAIL);
xaRollback(xaBranchXid);
throw e;
}
}
```
### Ⅱ. Describe what happened
TC侧
```
14:07:55.393 INFO --- [ batchLoggerPrint_1_1] [ocessor.server.BatchLogHandler] [ run] [] : receive msg[single]: BranchRollbackResponse{xid='192.168.70.224:8091:540864619345956865', branchId=540864619345956875, branchStatus=PhaseTwo_RollbackFailed_XAER_NOTA_Retryable, resultCode=Success, msg='null'}, clientIp: 192.168.70.224, vgroup: tx_group_shopping
14:07:55.393 INFO --- [ RetryRollbacking_1_1] [server.coordinator.DefaultCore] [a$doGlobalRollback$3] [192.168.70.224:8091:540864619345956865] : Rollback branch XAER_NOTA retry timeout, xid = 192.168.70.224:8091:540864619345956865 branchId = 540864619345956875
```
RM侧
```
14:07:55.392 [rpcDispatch_RMROLE_1_24_24] DEBUG i.s.c.r.p.c.RmBranchRollbackProcessor.65 - branch rollback result:BranchRollbackResponse{xid='192.168.70.224:8091:540864619345956865', branchId=540864619345956875, branchStatus=PhaseTwo_RollbackFailed_XAER_NOTA_Retryable, resultCode=Success, msg='null'}
```
If there is an exception, please attach the exception trace:
```
Just paste your stack trace here!
```
### Ⅲ. Describe what you expected to happen
### Ⅳ. How to reproduce it (as minimally and precisely as possible)
1. xxx
2. xxx
3. xxx
Minimal yet complete reproducer code (or URL to code):
### Ⅴ. Anything else we need to know?
### Ⅵ. Environment:
- JDK version(e.g. `java -version`):
- Seata client/server version:
- Database version:
- OS(e.g. `uname -a`):
- Others:
--
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: notifications-unsubscribe@seata.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org
Re: [I] [seata-java] XA模式在某些情况下,分支事务已经回滚,但TC仍会重试回滚直到超时 [incubator-seata-go]
Posted by "Code-Fight (via GitHub)" <gi...@apache.org>.
Code-Fight commented on issue #709:
URL: https://github.com/apache/incubator-seata-go/issues/709#issuecomment-2498405704
pls assign to me
--
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: notifications-unsubscribe@seata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org
Re: [I] [seata-java] XA模式在某些情况下,分支事务已经回滚,但TC仍会重试回滚直到超时 [incubator-seata-go]
Posted by "luky116 (via GitHub)" <gi...@apache.org>.
luky116 closed issue #709: [seata-java] XA模式在某些情况下,分支事务已经回滚,但TC仍会重试回滚直到超时
URL: https://github.com/apache/incubator-seata-go/issues/709
--
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: notifications-unsubscribe@seata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org