diff --git a/src/client/src/tscServer.c b/src/client/src/tscServer.c index a295f6fc973a73ffb2ca835a8973696b61e31203..7f3f0273dbc2672bd8e720e507e8e3a224eb21ed 100644 --- a/src/client/src/tscServer.c +++ b/src/client/src/tscServer.c @@ -50,7 +50,7 @@ TSKEY tscGetSubscriptionProgress(void* sub, int64_t uid); void tscUpdateSubscriptionProgress(void* sub, int64_t uid, TSKEY ts); void tscSaveSubscriptionProgress(void* sub); -static int32_t minMsgSize() { return tsRpcHeadSize + sizeof(STaosDigest); } +static int32_t minMsgSize() { return tsRpcHeadSize + 100; } void tscPrintMgmtIp() { if (tscMgmtIpList.numOfIps <= 0) { @@ -329,7 +329,7 @@ int tscSendMsgToServer(SSqlObj *pSql) { * message body by using "if (pHeader->msgType & 1)" may cause the segment fault. * */ - size_t totalLen = pSql->cmd.payloadLen + tsRpcHeadSize + sizeof(STaosDigest); + size_t totalLen = pSql->cmd.payloadLen + tsRpcHeadSize + 100; // the memory will be released by taosProcessResponse, so no memory leak here char *pStart = rpcMallocCont(pSql->cmd.payloadLen); @@ -350,10 +350,10 @@ int tscSendMsgToServer(SSqlObj *pSql) { //if (tscUpdateVnodeMsg[pSql->cmd.command]) (*tscUpdateVnodeMsg[pSql->cmd.command])(pSql, pStart); if (pSql->cmd.command < TSDB_SQL_MGMT) { - rpcSendRequest(pTscMgmtConn, tscMgmtIpList, pSql->cmd.msgType, pStart, pSql->cmd.payloadLen, pSql); + rpcSendRequest(pTscMgmtConn, &tscMgmtIpList, pSql->cmd.msgType, pStart, pSql->cmd.payloadLen, pSql); } else { SRpcIpSet rpcSet = tscMgmtIpList; - rpcSendRequest(pVnodeConn, rpcSet, pSql->cmd.msgType, pStart, pSql->cmd.payloadLen, pSql); + rpcSendRequest(pVnodeConn, &rpcSet, pSql->cmd.msgType, pStart, pSql->cmd.payloadLen, pSql); } tscTrace("%p send msg code:%d sig:%p", pSql, code, signature); diff --git a/src/client/src/tscUtil.c b/src/client/src/tscUtil.c index aaf459a2d6a791edfeef21833f9456a37d7a9eed..59e3283b1490f07307a6ef9a649cae7a568be2ef 100644 --- a/src/client/src/tscUtil.c +++ b/src/client/src/tscUtil.c @@ -600,7 +600,7 @@ int32_t tscCopyDataBlockToPayload(SSqlObj* pSql, STableDataBlocks* pDataBlock) { * the dataBlock only includes the RPC Header buffer and actual submit messsage body, space for digest needs * additional space. */ - int ret = tscAllocPayload(pCmd, pDataBlock->nAllocSize + sizeof(STaosDigest)); + int ret = tscAllocPayload(pCmd, pDataBlock->nAllocSize + 100); if (TSDB_CODE_SUCCESS != ret) { return ret; } @@ -613,7 +613,7 @@ int32_t tscCopyDataBlockToPayload(SSqlObj* pSql, STableDataBlocks* pDataBlock) { */ pCmd->payloadLen = pDataBlock->nAllocSize - tsRpcHeadSize; - assert(pCmd->allocSize >= pCmd->payloadLen + tsRpcHeadSize + sizeof(STaosDigest)); + assert(pCmd->allocSize >= pCmd->payloadLen + tsRpcHeadSize + 100); return TSDB_CODE_SUCCESS; } diff --git a/src/mnode/src/mgmtShell.c b/src/mnode/src/mgmtShell.c index d9161e1f04bebfcce1d79ea628fa90295cd07019..66e4c7afab3bdc60ee7fda88a3186b1990599fa9 100644 --- a/src/mnode/src/mgmtShell.c +++ b/src/mnode/src/mgmtShell.c @@ -137,25 +137,25 @@ static uint32_t mgmtSetMeterTagValue(char *pTags, STabObj *pMetric, STabObj *pMe return tagsLen; } -static char *mgmtAllocMsg(SConnObj *pConn, int32_t size, char **pMsg, STaosRsp **pRsp) { +//static char *mgmtAllocMsg(SConnObj *pConn, int32_t size, char **pMsg, STaosRsp **pRsp) { // char *pStart = taosBuildRspMsgWithSize(pConn->thandle, TSDB_MSG_TYPE_TABLE_META_RSP, size); // if (pStart == NULL) return 0; // *pMsg = pStart; // *pRsp = (STaosRsp *)(*pMsg); // // return pStart; - return 0; -} +// return 0; +//} -static char *mgmtForMultiAllocMsg(SConnObj *pConn, int32_t size, char **pMsg, STaosRsp **pRsp) { +//static char *mgmtForMultiAllocMsg(SConnObj *pConn, int32_t size, char **pMsg, STaosRsp **pRsp) { // char *pStart = taosBuildRspMsgWithSize(pConn->thandle, TSDB_MSG_TYPE_MULTI_TABLE_META_RSP, size); // if (pStart == NULL) return 0; // *pMsg = pStart; // *pRsp = (STaosRsp *)(*pMsg); // // return pStart; - return 0; -} +// return 0; +//} /** * check if we need to add mgmtProcessMeterMetaMsg into tranQueue, which will be executed one-by-one.