From f477e94ddac8924b4f3362789f145b0f1abb2765 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Wed, 24 Aug 2022 10:24:19 +0800 Subject: [PATCH] fix:error in snapshot from taosx --- source/dnode/vnode/src/tq/tq.c | 2 +- source/libs/executor/src/executil.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/source/dnode/vnode/src/tq/tq.c b/source/dnode/vnode/src/tq/tq.c index 366f1121e5..2fee77143f 100644 --- a/source/dnode/vnode/src/tq/tq.c +++ b/source/dnode/vnode/src/tq/tq.c @@ -401,7 +401,7 @@ int32_t tqProcessPollReq(STQ* pTq, SRpcMsg* pMsg) { tqDebug("tmq poll: consumer %ld, subkey %s, vg %d, no data", consumerId, pHandle->subKey, TD_VID(pTq->pVnode)); - tqOffsetResetToLog(&dataRsp.rspOffset, metaRsp.rspOffset.version); + tqOffsetResetToLog(&dataRsp.rspOffset, fetchOffsetNew.version); if (tqSendDataRsp(pTq, pMsg, pReq, &dataRsp) < 0) { code = -1; } diff --git a/source/libs/executor/src/executil.c b/source/libs/executor/src/executil.c index 024938f246..4eabd6f5e0 100644 --- a/source/libs/executor/src/executil.c +++ b/source/libs/executor/src/executil.c @@ -360,7 +360,7 @@ static int32_t createResultData(SDataType* pType, int32_t numOfRows, SScalarPara int32_t code = colInfoDataEnsureCapacity(pColumnData, numOfRows); if (code != TSDB_CODE_SUCCESS) { - terrno = TSDB_CODE_OUT_OF_MEMORY; + terrno = code; taosMemoryFree(pColumnData); return terrno; } @@ -378,6 +378,7 @@ static SColumnInfoData* getColInfoResult(void* metaHandle, uint64_t suid, SArray SScalarParam output = {0}; tagFilterAssist ctx = {0}; + ctx.colHash = taosHashInit(4, taosGetDefaultHashFunction(TSDB_DATA_TYPE_SMALLINT), false, HASH_NO_LOCK); if(ctx.colHash == NULL){ terrno = TSDB_CODE_OUT_OF_MEMORY; @@ -484,6 +485,7 @@ static SColumnInfoData* getColInfoResult(void* metaHandle, uint64_t suid, SArray code = createResultData(&type, rows, &output); if (code != TSDB_CODE_SUCCESS) { qError("failed to create result, reason:%s", tstrerror(code)); + terrno = code; goto end; } -- GitLab