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);
|
||||
pBatchReq->reqs = taosArrayInit(connKeyCnt, sizeof(SClientHbReq));
|
||||
|
||||
int64_t rid = -1;
|
||||
int32_t code = 0;
|
||||
|
||||
void *pIter = taosHashIterate(pAppHbMgr->activeInfo, NULL);
|
||||
while (pIter != NULL) {
|
||||
|
||||
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);
|
||||
|
||||
code = (*clientHbMgr.reqHandle[pOneReq->connKey.connType])(&pOneReq->connKey, &pOneReq->clusterId, pOneReq);
|
||||
if (code) {
|
||||
pIter = taosHashIterate(pAppHbMgr->activeInfo, pIter);
|
||||
pOneReq = pIter;
|
||||
continue;
|
||||
}
|
||||
|
||||
// hbClearClientHbReq(pOneReq);
|
||||
|
||||
pIter = taosHashIterate(pAppHbMgr->activeInfo, pIter);
|
||||
pOneReq = pIter;
|
||||
}
|
||||
|
||||
// if (code) {
|
||||
// taosArrayDestroyEx(pBatchReq->reqs, hbFreeReq);
|
||||
// taosMemoryFreeClear(pBatchReq);
|
||||
// }
|
||||
releaseTscObj(rid);
|
||||
|
||||
return pBatchReq;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue