From 07a0d21ff0f820ee9cf63971378642555ebf26d4 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Fri, 17 May 2024 23:39:17 +0800 Subject: [PATCH] fix:[TS-4716]wait too long if change system time --- source/client/src/clientTmq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/client/src/clientTmq.c b/source/client/src/clientTmq.c index 3db3cdb888..3141e21f26 100644 --- a/source/client/src/clientTmq.c +++ b/source/client/src/clientTmq.c @@ -1806,14 +1806,14 @@ static int32_t tmqPollImpl(tmq_t* tmq, int64_t timeout) { for (int j = 0; j < numOfVg; j++) { SMqClientVg* pVg = taosArrayGet(pTopic->vgs, j); int64_t elapsed = taosGetTimestampMs() - pVg->emptyBlockReceiveTs; - if (elapsed < EMPTY_BLOCK_POLL_IDLE_DURATION && elapsed > 0) { // less than 10ms + if (elapsed < EMPTY_BLOCK_POLL_IDLE_DURATION && elapsed >= 0) { // less than 10ms tscDebug("consumer:0x%" PRIx64 " epoch %d, vgId:%d idle for 10ms before start next poll", tmq->consumerId, tmq->epoch, pVg->vgId); continue; } elapsed = taosGetTimestampMs() - pVg->blockReceiveTs; - if (tmq->replayEnable && elapsed < pVg->blockSleepForReplay && elapsed > 0) { + if (tmq->replayEnable && elapsed < pVg->blockSleepForReplay && elapsed >= 0) { tscDebug("consumer:0x%" PRIx64 " epoch %d, vgId:%d idle for %" PRId64 "ms before start next poll when replay", tmq->consumerId, tmq->epoch, pVg->vgId, pVg->blockSleepForReplay); continue;