fix(tsc):fix taosdump failure
This commit is contained in:
parent
2a494b2671
commit
a43e03c1f7
|
@ -606,28 +606,34 @@ SClientHbBatchReq *hbGatherAllInfo(SAppHbMgr *pAppHbMgr) {
|
||||||
int32_t connKeyCnt = atomic_load_32(&pAppHbMgr->connKeyCnt);
|
int32_t connKeyCnt = atomic_load_32(&pAppHbMgr->connKeyCnt);
|
||||||
pBatchReq->reqs = taosArrayInit(connKeyCnt, sizeof(SClientHbReq));
|
pBatchReq->reqs = taosArrayInit(connKeyCnt, sizeof(SClientHbReq));
|
||||||
|
|
||||||
|
int64_t rid = -1;
|
||||||
int32_t code = 0;
|
int32_t code = 0;
|
||||||
|
|
||||||
void *pIter = taosHashIterate(pAppHbMgr->activeInfo, NULL);
|
void *pIter = taosHashIterate(pAppHbMgr->activeInfo, NULL);
|
||||||
while (pIter != NULL) {
|
|
||||||
SClientHbReq *pOneReq = pIter;
|
SClientHbReq *pOneReq = pIter;
|
||||||
|
SClientHbKey *connKey = pOneReq ? &pOneReq->connKey : NULL;
|
||||||
|
if (connKey != NULL) rid = connKey->tscRid;
|
||||||
|
|
||||||
|
STscObj *pTscObj = (STscObj *)acquireTscObj(rid);
|
||||||
|
if (pTscObj == NULL) {
|
||||||
|
tFreeClientHbBatchReq(pBatchReq);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
while (pIter != NULL) {
|
||||||
pOneReq = taosArrayPush(pBatchReq->reqs, pOneReq);
|
pOneReq = taosArrayPush(pBatchReq->reqs, pOneReq);
|
||||||
|
|
||||||
code = (*clientHbMgr.reqHandle[pOneReq->connKey.connType])(&pOneReq->connKey, &pOneReq->clusterId, pOneReq);
|
code = (*clientHbMgr.reqHandle[pOneReq->connKey.connType])(&pOneReq->connKey, &pOneReq->clusterId, pOneReq);
|
||||||
if (code) {
|
if (code) {
|
||||||
pIter = taosHashIterate(pAppHbMgr->activeInfo, pIter);
|
pIter = taosHashIterate(pAppHbMgr->activeInfo, pIter);
|
||||||
|
pOneReq = pIter;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// hbClearClientHbReq(pOneReq);
|
|
||||||
|
|
||||||
pIter = taosHashIterate(pAppHbMgr->activeInfo, pIter);
|
pIter = taosHashIterate(pAppHbMgr->activeInfo, pIter);
|
||||||
|
pOneReq = pIter;
|
||||||
}
|
}
|
||||||
|
releaseTscObj(rid);
|
||||||
// if (code) {
|
|
||||||
// taosArrayDestroyEx(pBatchReq->reqs, hbFreeReq);
|
|
||||||
// taosMemoryFreeClear(pBatchReq);
|
|
||||||
// }
|
|
||||||
|
|
||||||
return pBatchReq;
|
return pBatchReq;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue