提交 8513a30b 编写于 作者: K kailixu

chore: more code

上级 5d4bc82e
...@@ -63,7 +63,7 @@ typedef struct { ...@@ -63,7 +63,7 @@ typedef struct {
// statistics // statistics
int32_t reportCnt; int32_t reportCnt;
int32_t connKeyCnt; int32_t connKeyCnt;
int32_t nPassVerCb; int32_t passKeyCnt; // with passVer call back
int64_t reportBytes; // not implemented int64_t reportBytes; // not implemented
int64_t startTime; int64_t startTime;
// ctl // ctl
......
...@@ -68,6 +68,7 @@ static int32_t hbProcessUserPassInfoRsp(void *value, int32_t valueLen, SClientHb ...@@ -68,6 +68,7 @@ static int32_t hbProcessUserPassInfoRsp(void *value, int32_t valueLen, SClientHb
} }
SPassInfo *passInfo = &pTscObj->passInfo; SPassInfo *passInfo = &pTscObj->passInfo;
if (!passInfo->fp) { if (!passInfo->fp) {
releaseTscObj(pReq->connKey.tscRid);
continue; continue;
} }
...@@ -770,11 +771,11 @@ SClientHbBatchReq *hbGatherAllInfo(SAppHbMgr *pAppHbMgr) { ...@@ -770,11 +771,11 @@ SClientHbBatchReq *hbGatherAllInfo(SAppHbMgr *pAppHbMgr) {
return NULL; return NULL;
} }
int32_t nPassVerCb = atomic_load_32(&pAppHbMgr->nPassVerCb); int32_t passKeyCnt = atomic_load_32(&pAppHbMgr->passKeyCnt);
while (pIter != 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,
nPassVerCb); passKeyCnt);
break; break;
#if 0 #if 0
...@@ -1142,6 +1143,6 @@ void hbDeregisterConn(SAppHbMgr *pAppHbMgr, SClientHbKey connKey, void *connFp) ...@@ -1142,6 +1143,6 @@ void hbDeregisterConn(SAppHbMgr *pAppHbMgr, SClientHbKey connKey, void *connFp)
atomic_sub_fetch_32(&pAppHbMgr->connKeyCnt, 1); atomic_sub_fetch_32(&pAppHbMgr->connKeyCnt, 1);
if (connFp) { if (connFp) {
atomic_sub_fetch_32(&pAppHbMgr->nPassVerCb, 1); atomic_sub_fetch_32(&pAppHbMgr->passKeyCnt, 1);
} }
} }
...@@ -137,7 +137,7 @@ int taos_set_notify_cb(TAOS *taos, __taos_notify_fn_t fp, void *param, int type) ...@@ -137,7 +137,7 @@ int taos_set_notify_cb(TAOS *taos, __taos_notify_fn_t fp, void *param, int type)
pObj->passInfo.fp = fp; pObj->passInfo.fp = fp;
pObj->passInfo.param = param; pObj->passInfo.param = param;
if (fp) { if (fp) {
atomic_add_fetch_32(&pObj->pAppInfo->pAppHbMgr->nPassVerCb, 1); atomic_add_fetch_32(&pObj->pAppInfo->pAppHbMgr->passKeyCnt, 1);
} }
break; break;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册