From 574010e067070d313f497bb412f9f5eb91dd7c18 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Tue, 11 Jul 2023 16:06:19 +0800 Subject: [PATCH] fix:set firset version to reqOffset of response --- source/client/src/clientTmq.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/client/src/clientTmq.c b/source/client/src/clientTmq.c index 78f45be6bf..807e6cb53b 100644 --- a/source/client/src/clientTmq.c +++ b/source/client/src/clientTmq.c @@ -2262,6 +2262,8 @@ int64_t tmq_get_vgroup_offset(TAOS_RES* res) { STqOffsetVal* pOffset = &pRspObj->rsp.reqOffset; if (pOffset->type == TMQ_OFFSET__LOG) { return pRspObj->rsp.reqOffset.version; + }else{ + tscError("invalid offset type:%d", pOffset->type); } } else if (TD_RES_TMQ_META(res)) { SMqMetaRspObj* pRspObj = (SMqMetaRspObj*)res; @@ -2273,6 +2275,8 @@ int64_t tmq_get_vgroup_offset(TAOS_RES* res) { if (pRspObj->rsp.reqOffset.type == TMQ_OFFSET__LOG) { return pRspObj->rsp.reqOffset.version; } + } else{ + tscError("invalid tmqtype:%d", *(int8_t*)res); } // data from tsdb, no valid offset info