From f81f1b2adb6ed5eb5beb45e6c35a5cae54b963c0 Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Thu, 4 Aug 2022 15:02:26 +0800 Subject: [PATCH] feat(rpc): add probe msg --- src/client/src/tscServer.c | 7 ++++++- src/client/src/tscSubquery.c | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/client/src/tscServer.c b/src/client/src/tscServer.c index 227f89b605..4c2c8bde79 100644 --- a/src/client/src/tscServer.c +++ b/src/client/src/tscServer.c @@ -441,7 +441,12 @@ int tscSendMsgToServer(SSqlObj *pSql) { .code = 0 }; - rpcSendRequest(pObj->pRpcObj->pDnodeConn, &pSql->epSet, &rpcMsg, &pSql->rpcRid); + if(rpcSendRequest(pObj->pRpcObj->pDnodeConn, &pSql->epSet, &rpcMsg, &pSql->rpcRid)) { + if(pSql->cmd.command < TSDB_SQL_HB) + rpcSaveSendInfo(pSql->rpcRid, &pSql->pPrevContext); + return TSDB_CODE_SUCCESS; + } + return TSDB_CODE_SUCCESS; } diff --git a/src/client/src/tscSubquery.c b/src/client/src/tscSubquery.c index aefec7dc9d..ad11a50e03 100644 --- a/src/client/src/tscSubquery.c +++ b/src/client/src/tscSubquery.c @@ -3393,6 +3393,10 @@ static void doFreeInsertSupporter(SSqlObj* pSqlObj) { } static void multiVnodeInsertFinalize(void* param, TAOS_RES* tres, int numOfRows) { + if(param == NULL) { + tscError("callback multiVnodeInsertFinalize param is NULL. tres=%p numOfRows=%d", tres, numOfRows); + return ; + } SInsertSupporter *pSupporter = (SInsertSupporter *)param; SSqlObj* pParentObj = pSupporter->pSql; -- GitLab