partial retry
This commit is contained in:
parent
85729babf8
commit
46b5f8631c
|
@ -1185,18 +1185,6 @@ static int32_t mndTransExecSingleActions(SMnode *pMnode, STrans *pTrans, SArray
|
|||
for (int32_t action = 0; action < numOfActions; ++action) {
|
||||
STransAction *pAction = taosArrayGet(pArray, action);
|
||||
code = mndTransExecSingleAction(pMnode, pTrans, pAction);
|
||||
if (code == 0) {
|
||||
if (pAction->msgSent) {
|
||||
if (pAction->msgReceived) {
|
||||
if (pAction->errCode != 0 && pAction->errCode != pAction->acceptableCode) {
|
||||
mndTransResetAction(pMnode, pTrans, pAction);
|
||||
mInfo("trans:%d, %s execute fail mndTransSendSingleMsg", pTrans->id, mndTransStr(pAction->stage));
|
||||
} else {
|
||||
mInfo("trans:%d, %s execute successfully mndTransSendSingleMsg", pTrans->id, mndTransStr(pAction->stage));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (code != 0) break;
|
||||
}
|
||||
|
||||
|
@ -1241,6 +1229,21 @@ static int32_t mndTransExecuteActions(SMnode *pMnode, STrans *pTrans, SArray *pA
|
|||
}
|
||||
} else {
|
||||
mInfo("trans:%d, %d of %d actions executed", pTrans->id, numOfExecuted, numOfActions);
|
||||
|
||||
for (int32_t action = 0; action < numOfActions; ++action) {
|
||||
STransAction *pAction = taosArrayGet(pArray, action);
|
||||
mDebug("trans:%d, %s:%d Sent:%d, Received:%d, errCode:0x%x, acceptableCode:0x%x, retryCode:0x%x",
|
||||
pTrans->id, mndTransStr(pAction->stage), pAction->id, pAction->msgSent, pAction->msgReceived,
|
||||
pAction->errCode, pAction->acceptableCode, pAction->retryCode);
|
||||
if (pAction->msgSent) {
|
||||
if (pAction->msgReceived) {
|
||||
if (pAction->errCode != 0 && pAction->errCode != pAction->acceptableCode) {
|
||||
mndTransResetAction(pMnode, pTrans, pAction);
|
||||
mInfo("trans:%d, %s:%d reset", pTrans->id, mndTransStr(pAction->stage), pAction->id);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return TSDB_CODE_ACTION_IN_PROGRESS;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue