You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@seata.apache.org by "Polaris999 (via GitHub)" <gi...@apache.org> on 2025/12/24 11:32:55 UTC
[I] db模式endCommitted没有更新事务状态到数据库 [incubator-seata]
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: 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] db模式endCommitted没有更新事务状态到数据库 [incubator-seata]
Posted by "Polaris999 (via GitHub)" <gi...@apache.org>.
Polaris999 closed issue #7897: db模式endCommitted没有更新事务状态到数据库
URL: https://github.com/apache/incubator-seata/issues/7897
--
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] db模式endCommitted没有更新事务状态到数据库 [incubator-seata]
Posted by "funky-eyes (via GitHub)" <gi...@apache.org>.
funky-eyes commented on issue #7897:
URL: https://github.com/apache/incubator-seata/issues/7897#issuecomment-3690682079
There's no issue here—it's simply that you configured a retry timeout yourself. When the transaction retries the commit, it exceeds the retry time limit you set, which is why it ends up in the **CommitRetryTimeout** state.
The code in the `else` block is solely for monitoring and metrics reporting. The transaction status is set to **committing** just to allow asynchronous delayed cleanup of the transaction after the default 2 minutes and 10 seconds.
--
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] db模式endCommitted没有更新事务状态到数据库 [incubator-seata]
Posted by "YvCeung (via GitHub)" <gi...@apache.org>.
YvCeung commented on issue #7897:
URL: https://github.com/apache/incubator-seata/issues/7897#issuecomment-3689588387
This looks like a bug
--
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] db模式endCommitted没有更新事务状态到数据库 [incubator-seata]
Posted by "funky-eyes (via GitHub)" <gi...@apache.org>.
funky-eyes commented on issue #7897:
URL: https://github.com/apache/incubator-seata/issues/7897#issuecomment-3690683746
Because of the asynchronous deletion logic, you set the commit retry timeout too short—shorter than the default 2 minutes and 10 seconds used for retrying transactions in the committing state. As a result, during the retry process, it gets classified as CommitRetryTimeout.
--
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