未验证 提交 0ec69ec3 编写于 作者: H Haojun Liao 提交者: GitHub

Merge pull request #22003 from taosdata/mark/tmq

fix:seek failed in initilized status
...@@ -2794,11 +2794,12 @@ int32_t tmq_offset_seek(tmq_t* tmq, const char* pTopicName, int32_t vgId, int64_ ...@@ -2794,11 +2794,12 @@ int32_t tmq_offset_seek(tmq_t* tmq, const char* pTopicName, int32_t vgId, int64_
} }
// update the offset, and then commit to vnode // update the offset, and then commit to vnode
if (pOffsetInfo->currentOffset.type == TMQ_OFFSET__LOG) { // if (pOffsetInfo->currentOffset.type == TMQ_OFFSET__LOG) {
pOffsetInfo->currentOffset.version = offset; pOffsetInfo->currentOffset.type = TMQ_OFFSET__LOG;
pOffsetInfo->committedOffset.version = INT64_MIN; pOffsetInfo->currentOffset.version = offset >= 1 ? offset - 1 : 0;
pVg->seekUpdated = true; pOffsetInfo->committedOffset.version = INT64_MIN;
} pVg->seekUpdated = true;
// }
SMqRspObj rspObj = {.resType = RES_TYPE__TMQ, .vgId = pVg->vgId}; SMqRspObj rspObj = {.resType = RES_TYPE__TMQ, .vgId = pVg->vgId};
tstrncpy(rspObj.topic, tname, tListLen(rspObj.topic)); tstrncpy(rspObj.topic, tname, tListLen(rspObj.topic));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册