fix:set firset version to reqOffset of response

This commit is contained in:
wangmm0220 2023-07-11 16:06:19 +08:00
parent 7bc19df0ef
commit 574010e067
1 changed files with 4 additions and 0 deletions

View File

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