fix:seek to offset - 1

This commit is contained in:
wangmm0220 2023-07-09 11:54:53 +08:00
parent 3ad486e95b
commit 0929be690d
1 changed files with 1 additions and 1 deletions

View File

@ -2794,7 +2794,7 @@ int32_t tmq_offset_seek(tmq_t* tmq, const char* pTopicName, int32_t vgId, int64_
// update the offset, and then commit to vnode
if (pOffsetInfo->currentOffset.type == TMQ_OFFSET__LOG) {
pOffsetInfo->currentOffset.version = offset;
pOffsetInfo->currentOffset.version = offset - 1;
pOffsetInfo->committedOffset.version = INT64_MIN;
pVg->seekUpdated = true;
}