You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@seata.apache.org by "xjlgod (via GitHub)" <gi...@apache.org> on 2025/03/16 04:50:42 UTC
Re: [PR] optimize/optimize changeGlobalStatus interface of console [incubator-seata]
xjlgod commented on code in PR #7224:
URL: https://github.com/apache/incubator-seata/pull/7224#discussion_r1997481643
##########
server/src/main/java/org/apache/seata/server/console/impl/AbstractGlobalService.java:
##########
@@ -150,16 +150,18 @@ public SingleResult<Void> sendCommitOrRollback(String xid) {
public SingleResult<Void> changeGlobalStatus(String xid) {
GlobalSession globalSession = checkGlobalSession(xid);
GlobalStatus globalStatus = globalSession.getStatus();
- GlobalStatus newStatus = FAIL_COMMIT_STATUS.contains(globalStatus) ? GlobalStatus.CommitRetrying :
- FAIL_ROLLBACK_STATUS.contains(globalStatus) ? GlobalStatus.RollbackRetrying : null;
- if (newStatus == null) {
- throw new IllegalArgumentException("current global transaction status is not support to change");
- }
try {
- globalSession.changeGlobalStatus(newStatus);
- return SingleResult.success();
+ if (FAIL_COMMIT_STATUS.contains(globalStatus)) {
+ boolean committed = doCommitGlobal(globalSession);
Review Comment:
Should we add more status to support? Now these status are failed and timeout.
--
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