fix: deadlock while rollback
This commit is contained in:
parent
948d01a3ac
commit
9d72eda2c5
|
@ -1287,6 +1287,7 @@ static bool mndTransPerformRedoActionStage(SMnode *pMnode, STrans *pTrans) {
|
||||||
mDebug("trans:%d, stage keep on redoAction since %s", pTrans->id, tstrerror(code));
|
mDebug("trans:%d, stage keep on redoAction since %s", pTrans->id, tstrerror(code));
|
||||||
continueExec = false;
|
continueExec = false;
|
||||||
} else {
|
} else {
|
||||||
|
pTrans->failedTimes++;
|
||||||
pTrans->code = terrno;
|
pTrans->code = terrno;
|
||||||
if (pTrans->policy == TRN_POLICY_ROLLBACK) {
|
if (pTrans->policy == TRN_POLICY_ROLLBACK) {
|
||||||
if (pTrans->lastAction != 0) {
|
if (pTrans->lastAction != 0) {
|
||||||
|
@ -1306,7 +1307,6 @@ static bool mndTransPerformRedoActionStage(SMnode *pMnode, STrans *pTrans) {
|
||||||
mError("trans:%d, stage from redoAction to rollback since %s", pTrans->id, terrstr());
|
mError("trans:%d, stage from redoAction to rollback since %s", pTrans->id, terrstr());
|
||||||
continueExec = true;
|
continueExec = true;
|
||||||
} else {
|
} else {
|
||||||
pTrans->failedTimes++;
|
|
||||||
mError("trans:%d, stage keep on redoAction since %s, failedTimes:%d", pTrans->id, terrstr(), pTrans->failedTimes);
|
mError("trans:%d, stage keep on redoAction since %s, failedTimes:%d", pTrans->id, terrstr(), pTrans->failedTimes);
|
||||||
continueExec = false;
|
continueExec = false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue