diff --git a/source/client/src/clientEnv.c b/source/client/src/clientEnv.c index 6689334c1e..3a821768f8 100644 --- a/source/client/src/clientEnv.c +++ b/source/client/src/clientEnv.c @@ -157,7 +157,10 @@ static void generateWriteSlowLog(STscObj *pTscObj, SRequestObj *pRequest, int32_ } char* value = cJSON_PrintUnformatted(json); - MonitorSlowLogData data = {.clusterId = pTscObj->pAppInfo->clusterId, .type = SLOW_LOG_WRITE, .data = value}; + MonitorSlowLogData data = {0}; + data.clusterId = pTscObj->pAppInfo->clusterId; + data.type = SLOW_LOG_WRITE; + data.data = value; if(monitorPutData2MonitorQueue(data) < 0){ taosMemoryFree(value); } diff --git a/source/client/src/clientHb.c b/source/client/src/clientHb.c index 07a9e0c463..81c9e1252f 100644 --- a/source/client/src/clientHb.c +++ b/source/client/src/clientHb.c @@ -547,7 +547,6 @@ static int32_t hbAsyncCallBack(void *param, SDataBuf *pMsg, int32_t code) { } SAppInstInfo *pInst = pAppHbMgr->pAppInstInfo; - int32_t oldInterval = pInst->monitorParas.tsMonitorInterval; pInst->monitorParas = pRsp.monitorParas; tscDebug("[monitor] paras from hb, clusterId:%" PRIx64 " monitorParas threshold:%d scope:%d", pInst->clusterId, pRsp.monitorParas.tsSlowLogThreshold, pRsp.monitorParas.tsSlowLogScope); diff --git a/source/client/src/clientMsgHandler.c b/source/client/src/clientMsgHandler.c index 43600f60e1..e5baa7137e 100644 --- a/source/client/src/clientMsgHandler.c +++ b/source/client/src/clientMsgHandler.c @@ -155,7 +155,9 @@ int32_t processConnectRsp(void* param, SDataBuf* pMsg, int32_t code) { if(taosHashPut(appInfo.pInstMapByClusterId, &connectRsp.clusterId, LONG_BYTES, &pTscObj->pAppInfo, POINTER_BYTES) != 0){ tscError("failed to put appInfo into appInfo.pInstMapByClusterId"); } - MonitorSlowLogData data ={.clusterId = pTscObj->pAppInfo->clusterId, .type = SLOW_LOG_READ_BEGINNIG, .pFile = NULL, .data = NULL}; + MonitorSlowLogData data = {0}; + data.clusterId = pTscObj->pAppInfo->clusterId; + data.type = SLOW_LOG_READ_BEGINNIG; monitorPutData2MonitorQueue(data); monitorClientSlowQueryInit(connectRsp.clusterId); monitorClientSQLReqInit(connectRsp.clusterId);