fix(stream): calculate the error code after set current rsp status.
This commit is contained in:
parent
aaf67a42eb
commit
da4018931b
|
@ -1226,10 +1226,6 @@ static bool setDispatchRspInfo(SDispatchMsgInfo* pMsgInfo, int32_t vgId, int32_t
|
||||||
SDispatchEntry* pEntry = taosArrayGet(pMsgInfo->pSendInfo, i);
|
SDispatchEntry* pEntry = taosArrayGet(pMsgInfo->pSendInfo, i);
|
||||||
if (pEntry->rspTs != -1) {
|
if (pEntry->rspTs != -1) {
|
||||||
numOfRsp += 1;
|
numOfRsp += 1;
|
||||||
} else {
|
|
||||||
if (pEntry->status != TSDB_CODE_SUCCESS || isDispatchRspTimeout(pEntry, now)) {
|
|
||||||
numOfFailed += 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1253,6 +1249,14 @@ static bool setDispatchRspInfo(SDispatchMsgInfo* pMsgInfo, int32_t vgId, int32_t
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// this code may be error code.
|
||||||
|
for (int32_t i = 0; i < numOfDispatchBranch; ++i) {
|
||||||
|
SDispatchEntry* pEntry = taosArrayGet(pMsgInfo->pSendInfo, i);
|
||||||
|
if (pEntry->status != TSDB_CODE_SUCCESS || isDispatchRspTimeout(pEntry, now)) {
|
||||||
|
numOfFailed += 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
*pFailed = numOfFailed;
|
*pFailed = numOfFailed;
|
||||||
*pNotRsp = numOfDispatchBranch - numOfRsp;
|
*pNotRsp = numOfDispatchBranch - numOfRsp;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue