[inner-2222] clear the 'sendData' resource in the transaction correctly (cherry pick from #3702)

This commit is contained in:
wenyh
2023-05-22 17:51:45 +08:00
committed by wenyh1
parent fb8763f661
commit 9b184d4b56
3 changed files with 6 additions and 2 deletions

View File

@@ -60,6 +60,10 @@ public class TransactionHandlerManager {
}
}
public NormalTransactionHandler getNormalTransactionHandler() {
return (NormalTransactionHandler) normalHandler;
}
public void commit() {
if (xaTxId != null) {
xaHandler.commit();

View File

@@ -34,7 +34,7 @@ public class CommitStage implements TransactionStage {
if (session.closed()) {
return null;
}
session.getTransactionManager().getNormalTransactionHandler().clearResources();
if (isFail) {
session.setFinishedCommitTime();
session.setResponseTime(false);

View File

@@ -31,7 +31,7 @@ public class RollbackStage implements TransactionStage {
if (session.closed()) {
return null;
}
session.getTransactionManager().getNormalTransactionHandler().clearResources();
session.setResponseTime(false);
if (isFail) {
session.getSource().write(sendData);