fix: reset errorcode after check leader
This commit is contained in:
parent
03ad2087ce
commit
9b98f547d1
|
@ -663,7 +663,9 @@ _OVER:
|
||||||
|
|
||||||
const STraceId *trace = &pMsg->info.traceId;
|
const STraceId *trace = &pMsg->info.traceId;
|
||||||
SEpSet epSet = {0};
|
SEpSet epSet = {0};
|
||||||
|
int32_t tmpCode = terrno;
|
||||||
mndGetMnodeEpSet(pMnode, &epSet);
|
mndGetMnodeEpSet(pMnode, &epSet);
|
||||||
|
terrno = tmpCode;
|
||||||
|
|
||||||
mGDebug(
|
mGDebug(
|
||||||
"msg:%p, type:%s failed to process since %s, mnode restored:%d stopped:%d, sync restored:%d "
|
"msg:%p, type:%s failed to process since %s, mnode restored:%d stopped:%d, sync restored:%d "
|
||||||
|
|
|
@ -927,7 +927,8 @@ static void mndTransSendRpcRsp(SMnode *pMnode, STrans *pTrans) {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (pTrans->stage == TRN_STAGE_REDO_ACTION) {
|
if (pTrans->stage == TRN_STAGE_REDO_ACTION) {
|
||||||
if (code == TSDB_CODE_SYN_NOT_LEADER || code == TSDB_CODE_SYN_RESTORING || code == TSDB_CODE_APP_IS_STARTING) {
|
if (code == TSDB_CODE_SYN_NOT_LEADER || code == TSDB_CODE_SYN_RESTORING || code == TSDB_CODE_APP_IS_STARTING ||
|
||||||
|
code == TSDB_CODE_SYN_PROPOSE_NOT_READY) {
|
||||||
if (pTrans->failedTimes > 60) sendRsp = true;
|
if (pTrans->failedTimes > 60) sendRsp = true;
|
||||||
} else {
|
} else {
|
||||||
if (pTrans->failedTimes > 6) sendRsp = true;
|
if (pTrans->failedTimes > 6) sendRsp = true;
|
||||||
|
@ -1336,6 +1337,7 @@ static bool mndTransPerformRedoActionStage(SMnode *pMnode, STrans *pTrans) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mndCannotExecuteTransAction(pMnode)) return false;
|
if (mndCannotExecuteTransAction(pMnode)) return false;
|
||||||
|
terrno = code;
|
||||||
|
|
||||||
if (code == 0) {
|
if (code == 0) {
|
||||||
pTrans->code = 0;
|
pTrans->code = 0;
|
||||||
|
|
Loading…
Reference in New Issue