From 3ad486e95bbff527c0a712c884b29a7c4918f9e2 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Sun, 9 Jul 2023 11:34:49 +0800 Subject: [PATCH] fix:seek failed if type is earliest --- source/client/src/clientTmq.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/source/client/src/clientTmq.c b/source/client/src/clientTmq.c index 5fd79a2711..d9f021211c 100644 --- a/source/client/src/clientTmq.c +++ b/source/client/src/clientTmq.c @@ -2709,17 +2709,16 @@ int32_t tmq_get_topic_assignment(tmq_t* tmq, const char* pTopicName, tmq_topic_a SVgOffsetInfo* pOffsetInfo = &pClientVg->offsetInfo; -// pOffsetInfo->currentOffset.type = TMQ_OFFSET__LOG; + pOffsetInfo->currentOffset.type = TMQ_OFFSET__LOG; + char offsetBuf[TSDB_OFFSET_LEN] = {0}; + tFormatOffset(offsetBuf, tListLen(offsetBuf), &pOffsetInfo->currentOffset); -// char offsetBuf[TSDB_OFFSET_LEN] = {0}; -// tFormatOffset(offsetBuf, tListLen(offsetBuf), &pOffsetInfo->currentOffset); - - tscInfo("vgId:%d offset is update to:%"PRId64, p->vgId, p->currentOffset); + tscInfo("vgId:%d offset is update to:%s", p->vgId, offsetBuf); pOffsetInfo->walVerBegin = p->begin; pOffsetInfo->walVerEnd = p->end; -// pOffsetInfo->currentOffset.version = p->currentOffset; -// pOffsetInfo->committedOffset.version = p->currentOffset; + pOffsetInfo->currentOffset.version = p->currentOffset; + pOffsetInfo->committedOffset.version = p->currentOffset; } } } -- GitLab