Polaris999 opened a new issue, #7897: URL: https://github.com/apache/incubator-seata/issues/7897
### Check Ahead - [x] I have searched the [issues](https://github.com/seata/seata/issues) of this repository and believe that this is not a duplicate. - [ ] I am willing to try to fix this bug myself. ### Ⅰ. Issue Description ` /** * End committed. * * @param globalSession the global session * @param retryGlobal the retry global * @throws TransactionException the transaction exception */ public static void endCommitted(GlobalSession globalSession, boolean retryGlobal) throws TransactionException { if (retryGlobal || !DELAY_HANDLE_SESSION) { long beginTime = System.currentTimeMillis(); boolean retryBranch = globalSession.getStatus() == GlobalStatus.CommitRetrying; if (!globalSession.getStatus().equals(GlobalStatus.Committed)) { // TODO: If the globalSession status in the database is Committed, don't set status again globalSession.changeGlobalStatus(GlobalStatus.Committed); } globalSession.end(); if (!DELAY_HANDLE_SESSION) { MetricsPublisher.postSessionDoneEvent(globalSession, retryGlobal, false); } MetricsPublisher.postSessionDoneEvent( globalSession, IdConstants.STATUS_VALUE_AFTER_COMMITTED_KEY, true, beginTime, retryBranch); } else { globalSession.setStatus(GlobalStatus.Committed); if (globalSession.isSaga()) { globalSession.end(); } MetricsPublisher.postSessionDoneEvent(globalSession, false, false); } }` else处globalSession.setStatus(GlobalStatus.Committed); 只有赋值没有保存到db,导致global_table里事务状态还是2("Committing"),后续被retryCommitting定时任务更新成了16("CommitRetryTimeout") ### Ⅱ. Describe what happened _No response_ ### Ⅲ. Describe what you expected to happen _No response_ ### Ⅳ. How to reproduce it (as minimally and precisely as possible) _No response_ ### Ⅴ. Anything else we need to know? _No response_ ### Ⅵ. Environment _No response_ -- 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]
