compile error

This commit is contained in:
slguan 2020-02-20 11:35:26 +08:00
parent baf6b0fa78
commit 23693d9c53
3 changed files with 12 additions and 12 deletions

View File

@ -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);

View File

@ -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;
}

View File

@ -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.