diff --git a/source/client/src/clientImpl.c b/source/client/src/clientImpl.c index 1c0be6b3ac..18cdd58639 100644 --- a/source/client/src/clientImpl.c +++ b/source/client/src/clientImpl.c @@ -37,7 +37,6 @@ void setQueryRequest(int64_t rId) { pReq->isQuery = true; (void)releaseRequest(rId); } - } static bool stringLengthCheck(const char* str, size_t maxsize) { @@ -2245,7 +2244,7 @@ static int32_t doConvertJson(SReqResultInfo* pResultInfo, int32_t numOfCols, int } else if (tTagIsJson(data)) { char* jsonString = NULL; parseTagDatatoJson(data, &jsonString); - if(jsonString == NULL) { + if (jsonString == NULL) { tscError("doConvertJson error: parseTagDatatoJson failed"); return terrno; } @@ -2517,10 +2516,10 @@ TSDB_SERVER_STATUS taos_check_server_status(const char* fqdn, int port, char* de void* clientRpc = NULL; SServerStatusRsp statusRsp = {0}; SEpSet epSet = {.inUse = 0, .numOfEps = 1}; - SRpcMsg rpcMsg = {.info.ahandle = (void*)0x9526, .msgType = TDMT_DND_SERVER_STATUS}; - SRpcMsg rpcRsp = {0}; - SRpcInit rpcInit = {0}; - char pass[TSDB_PASSWORD_LEN + 1] = {0}; + SRpcMsg rpcMsg = {.info.ahandle = (void*)0x9527, .info.notFreeAhandle = 1, .msgType = TDMT_DND_SERVER_STATUS}; + SRpcMsg rpcRsp = {0}; + SRpcInit rpcInit = {0}; + char pass[TSDB_PASSWORD_LEN + 1] = {0}; rpcInit.label = "CHK"; rpcInit.numOfThreads = 1; @@ -3032,7 +3031,8 @@ void taosAsyncFetchImpl(SRequestObj* pRequest, __taos_async_fn_t fp, void* param void doRequestCallback(SRequestObj* pRequest, int32_t code) { pRequest->inCallback = true; int64_t this = pRequest->self; - if (tsQueryTbNotExistAsEmpty && TD_RES_QUERY(&pRequest->resType) && pRequest->isQuery && (code == TSDB_CODE_PAR_TABLE_NOT_EXIST || code == TSDB_CODE_TDB_TABLE_NOT_EXIST)) { + if (tsQueryTbNotExistAsEmpty && TD_RES_QUERY(&pRequest->resType) && pRequest->isQuery && + (code == TSDB_CODE_PAR_TABLE_NOT_EXIST || code == TSDB_CODE_TDB_TABLE_NOT_EXIST)) { code = TSDB_CODE_SUCCESS; pRequest->type = TSDB_SQL_RETRIEVE_EMPTY_RESULT; } diff --git a/source/dnode/mgmt/mgmt_dnode/src/dmHandle.c b/source/dnode/mgmt/mgmt_dnode/src/dmHandle.c index ae12bf6c99..020a8077b2 100644 --- a/source/dnode/mgmt/mgmt_dnode/src/dmHandle.c +++ b/source/dnode/mgmt/mgmt_dnode/src/dmHandle.c @@ -69,6 +69,7 @@ static void dmMayShouldUpdateIpWhiteList(SDnodeMgmt *pMgmt, int64_t ver) { .contLen = contLen, .msgType = TDMT_MND_RETRIEVE_IP_WHITE, .info.ahandle = (void *)0x9527, + .info.notFreeAhandle = 1, .info.refId = 0, .info.noResp = 0, .info.handle = 0}; @@ -185,6 +186,7 @@ void dmSendStatusReq(SDnodeMgmt *pMgmt) { .contLen = contLen, .msgType = TDMT_MND_STATUS, .info.ahandle = (void *)0x9527, + .info.notFreeAhandle = 1, .info.refId = 0, .info.noResp = 0, .info.handle = 0}; @@ -234,6 +236,7 @@ void dmSendNotifyReq(SDnodeMgmt *pMgmt, SNotifyReq *pReq) { .contLen = contLen, .msgType = TDMT_MND_NOTIFY, .info.ahandle = (void *)0x9527, + .info.notFreeAhandle = 1, .info.refId = 0, .info.noResp = 1, .info.handle = 0}; @@ -483,7 +486,7 @@ int32_t dmProcessRetrieve(SDnodeMgmt *pMgmt, SRpcMsg *pMsg) { } int32_t len = blockEncode(pBlock, pStart, numOfCols); - if(len < 0) { + if (len < 0) { dError("failed to retrieve data since %s", tstrerror(code)); blockDataDestroy(pBlock); rpcFreeCont(pRsp); diff --git a/source/dnode/mnode/impl/src/mndMain.c b/source/dnode/mnode/impl/src/mndMain.c index a0dd30f11a..6e1a745cfa 100644 --- a/source/dnode/mnode/impl/src/mndMain.c +++ b/source/dnode/mnode/impl/src/mndMain.c @@ -210,8 +210,11 @@ static void mndPullupGrant(SMnode *pMnode) { int32_t contLen = 0; void *pReq = mndBuildTimerMsg(&contLen); if (pReq != NULL) { - SRpcMsg rpcMsg = { - .msgType = TDMT_MND_GRANT_HB_TIMER, .pCont = pReq, .contLen = contLen, .info.ahandle = (void *)0x9527}; + SRpcMsg rpcMsg = {.msgType = TDMT_MND_GRANT_HB_TIMER, + .pCont = pReq, + .contLen = contLen, + .info.notFreeAhandle = 1, + .info.ahandle = (void *)0x9527}; // TODO check return value (void)tmsgPutToQueue(&pMnode->msgCb, WRITE_QUEUE, &rpcMsg); } @@ -222,8 +225,11 @@ static void mndIncreaseUpTime(SMnode *pMnode) { int32_t contLen = 0; void *pReq = mndBuildTimerMsg(&contLen); if (pReq != NULL) { - SRpcMsg rpcMsg = { - .msgType = TDMT_MND_UPTIME_TIMER, .pCont = pReq, .contLen = contLen, .info.ahandle = (void *)0x9528}; + SRpcMsg rpcMsg = {.msgType = TDMT_MND_UPTIME_TIMER, + .pCont = pReq, + .contLen = contLen, + .info.notFreeAhandle = 1, + .info.ahandle = (void *)0x9527}; // TODO check return value (void)tmsgPutToQueue(&pMnode->msgCb, WRITE_QUEUE, &rpcMsg); } diff --git a/source/libs/sync/src/syncMain.c b/source/libs/sync/src/syncMain.c index 4dce54fc1a..e3b3f6b43d 100644 --- a/source/libs/sync/src/syncMain.c +++ b/source/libs/sync/src/syncMain.c @@ -403,7 +403,7 @@ int32_t syncSendTimeoutRsp(int64_t rid, int64_t seq) { TAOS_RETURN(code); } - SRpcMsg rpcMsg = {0}; + SRpcMsg rpcMsg = {0, .info.notFreeAhandle = 1}; int32_t ret = syncRespMgrGetAndDel(pNode->pSyncRespMgr, seq, &rpcMsg.info); rpcMsg.code = TSDB_CODE_SYN_TIMEOUT; diff --git a/tools/shell/src/shellNettest.c b/tools/shell/src/shellNettest.c index 9fe92212ca..2e5ec7bc24 100644 --- a/tools/shell/src/shellNettest.c +++ b/tools/shell/src/shellNettest.c @@ -61,7 +61,7 @@ static void shellWorkAsClient() { uint64_t startTime = taosGetTimestampUs(); for (int32_t i = 0; i < pArgs->pktNum; ++i) { - SRpcMsg rpcMsg = {.info.ahandle = (void *)0x9525, .msgType = TDMT_DND_NET_TEST}; + SRpcMsg rpcMsg = {.info.ahandle = (void *)0x9525, .info.notFreeAhandle = 1, .msgType = TDMT_DND_NET_TEST}; rpcMsg.pCont = rpcMallocCont(pArgs->pktLen); rpcMsg.contLen = pArgs->pktLen;