john1337 opened a new issue, #37128:
URL: https://github.com/apache/shardingsphere/issues/37128
using shardingsphere's shardingsphere-transaction-base-seata-at,but did't
save data in local db,i debug into SeataATShardingSphereTransactionManager's
commit method,i trace into this method,found it called
DefaultGlobalTransaction's commit method,code as follows:
public void commit() throws TransactionException {
if (role == GlobalTransactionRole.Participant) {
// Participant has no responsibility of committing
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Ignore Commit(): just involved in global
transaction [{}]", xid);
}
return;
}
assertXIDNotNull();
if (LOGGER.isInfoEnabled()) {
LOGGER.info("transaction {} will be commit", xid);
}
int retry = COMMIT_RETRY_COUNT <= 0 ? DEFAULT_TM_COMMIT_RETRY_COUNT
: COMMIT_RETRY_COUNT;
try {
while (retry > 0) {
try {
retry--;
status = transactionManager.commit(xid);
break;
} catch (Throwable ex) {
LOGGER.error(
"Failed to report global commit [{}],Retry
Countdown: {}, reason: {}",
this.getXid(),
retry,
ex.getMessage());
if (retry == 0) {
throw new TransactionException("Failed to report
global commit", ex);
}
}
}
} finally {
if (xid.equals(RootContext.getXID())) {
suspend(true);
}
}
if (LOGGER.isInfoEnabled()) {
LOGGER.info("[{}] commit status: {}", xid, status);
}
}
it will call seata's DefaultTransactionManager commit method,this method
will send seata's GlobalCommitRequest request ,so by tracing the whole code,i
didn't see any local db commit method,so it make clear why i didn't see data
stored in local database
--
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]