From c159fd07471c6a36c42bbcdfdef2bc2b84b99cc1 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Sat, 4 Mar 2023 16:37:44 +0800 Subject: [PATCH 1/2] refactor: disable sleep temporarily. --- source/client/src/clientTmq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/client/src/clientTmq.c b/source/client/src/clientTmq.c index 56d0148272..7a31ab572c 100644 --- a/source/client/src/clientTmq.c +++ b/source/client/src/clientTmq.c @@ -1228,7 +1228,7 @@ int32_t tmqPollCb(void* param, SDataBuf* pMsg, int32_t code) { // in case of consumer mismatch, wait for 500ms and retry if (code == TSDB_CODE_TMQ_CONSUMER_MISMATCH) { - taosMsleep(500); +// taosMsleep(500); atomic_store_8(&tmq->status, TMQ_CONSUMER_STATUS__RECOVER); } else if (code == TSDB_CODE_TQ_NO_COMMITTED_OFFSET) { SMqPollRspWrapper* pRspWrapper = taosAllocateQitem(sizeof(SMqPollRspWrapper), DEF_QITEM, 0); From 33f2d076052013ae0d5cab38b5acac5304c84eb1 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Sat, 4 Mar 2023 16:38:50 +0800 Subject: [PATCH 2/2] refactor: sleep for a while. --- source/client/src/clientTmq.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/client/src/clientTmq.c b/source/client/src/clientTmq.c index 7a31ab572c..d08cabd27e 100644 --- a/source/client/src/clientTmq.c +++ b/source/client/src/clientTmq.c @@ -1918,6 +1918,7 @@ TAOS_RES* tmq_consumer_poll(tmq_t* tmq, int64_t timeout) { // in no topic status, delayed task also need to be processed if (atomic_load_8(&tmq->status) == TMQ_CONSUMER_STATUS__INIT) { tscDebug("consumer:0x%" PRIx64 " poll return since consumer is init", tmq->consumerId); + // sleep for a while return NULL; }