mirror of
https://github.com/actiontech/dble.git
synced 2026-01-05 20:30:40 -06:00
[inner-2222] clear the 'sendData' resource in the transaction correctly (cherry pick)
This commit is contained in:
@@ -65,6 +65,10 @@ public class TransactionHandlerManager {
|
||||
}
|
||||
}
|
||||
|
||||
public NormalTransactionHandler getNormalTransactionHandler() {
|
||||
return (NormalTransactionHandler) normalHandler;
|
||||
}
|
||||
|
||||
public void commit() {
|
||||
if (xaTxId != null) {
|
||||
xaHandler.commit();
|
||||
|
||||
@@ -64,6 +64,7 @@ public class CommitStage extends Stage implements TransactionStage {
|
||||
}
|
||||
|
||||
private void asyncNext(boolean isFail, String errMsg, MySQLPacket sendData) {
|
||||
session.getTransactionManager().getNormalTransactionHandler().clearResources();
|
||||
if (isFail) {
|
||||
session.setFinishedCommitTime();
|
||||
session.setResponseTime(false);
|
||||
@@ -87,6 +88,7 @@ public class CommitStage extends Stage implements TransactionStage {
|
||||
}
|
||||
|
||||
private void syncNext(boolean isFail, String errMsg, MySQLPacket sendData) {
|
||||
session.getTransactionManager().getNormalTransactionHandler().clearResources();
|
||||
if (isFail) {
|
||||
session.getShardingService().setPacketId(0);
|
||||
if (sendData != null) {
|
||||
|
||||
@@ -37,7 +37,7 @@ public class RollbackStage implements TransactionStage {
|
||||
}
|
||||
|
||||
session.setResponseTime(false);
|
||||
|
||||
session.getTransactionManager().getNormalTransactionHandler().clearResources();
|
||||
LOGGER.info("GET INTO THE NET LEVEL AND THE RESULT IS " + isFail);
|
||||
if (isFail) {
|
||||
if (sendData != null) {
|
||||
|
||||
Reference in New Issue
Block a user