refactor some code, fix the used time too big bug.

This commit is contained in:
hjxilinx 2019-11-11 11:58:20 +08:00
parent 7ed580d93b
commit 5400e49c7e
3 changed files with 4 additions and 4 deletions

View File

@ -2842,7 +2842,7 @@ int tscBuildMetricMetaMsg(SSqlObj *pSql) {
return msgLen; return msgLen;
} }
int tscEstimateBuildHeartBeatMsgLength(SSqlObj *pSql) { int tscEstimateHeartBeatMsgLength(SSqlObj *pSql) {
int size = 0; int size = 0;
STscObj *pObj = pSql->pTscObj; STscObj *pObj = pSql->pTscObj;
@ -2875,7 +2875,7 @@ int tscBuildHeartBeatMsg(SSqlObj *pSql) {
pthread_mutex_lock(&pObj->mutex); pthread_mutex_lock(&pObj->mutex);
size = tscEstimateBuildHeartBeatMsgLength(pSql); size = tscEstimateHeartBeatMsgLength(pSql);
if (TSDB_CODE_SUCCESS != tscAllocPayload(pCmd, size)) { if (TSDB_CODE_SUCCESS != tscAllocPayload(pCmd, size)) {
tscError("%p failed to malloc for heartbeat msg", pSql); tscError("%p failed to malloc for heartbeat msg", pSql);
return -1; return -1;

View File

@ -41,7 +41,7 @@ extern int taosTmrThreads;
tprintf("TMR ", tmrDebugFlag, __VA_ARGS__); \ tprintf("TMR ", tmrDebugFlag, __VA_ARGS__); \
} } while(0) } } while(0)
#define MAX_NUM_OF_TMRCTL 32 #define MAX_NUM_OF_TMRCTL 512
#define MSECONDS_PER_TICK 5 #define MSECONDS_PER_TICK 5
void *taosTmrInit(int maxTmr, int resoultion, int longest, const char *label); void *taosTmrInit(int maxTmr, int resoultion, int longest, const char *label);

View File

@ -419,7 +419,7 @@ void vnodeExecuteRetrieveReq(SSchedMsg *pSched) {
if (code == TSDB_CODE_SUCCESS) { if (code == TSDB_CODE_SUCCESS) {
pRsp->offset = htobe64(vnodeGetOffsetVal(pRetrieve->qhandle)); pRsp->offset = htobe64(vnodeGetOffsetVal(pRetrieve->qhandle));
pRsp->useconds = ((SQInfo *)(pRetrieve->qhandle))->useconds; pRsp->useconds = htobe64(((SQInfo *)(pRetrieve->qhandle))->useconds);
} else { } else {
pRsp->offset = 0; pRsp->offset = 0;
pRsp->useconds = 0; pRsp->useconds = 0;