From dcd664c2cb53908d99265d30b58015eb2e11b3f2 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Sun, 24 Nov 2024 23:39:48 +0800 Subject: [PATCH] fix:[TS-5679] auto commit error --- source/client/src/clientTmq.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/source/client/src/clientTmq.c b/source/client/src/clientTmq.c index 849526e948..902e581bfd 100644 --- a/source/client/src/clientTmq.c +++ b/source/client/src/clientTmq.c @@ -1872,13 +1872,17 @@ int32_t tmq_subscribe(tmq_t* tmq, const tmq_list_t* topic_list) { if (tmq->epTimer == NULL){ tmq->epTimer = taosTmrStart(tmqAssignAskEpTask, DEFAULT_ASKEP_INTERVAL, (void*)(tmq->refId), tmqMgmt.timer); + if (tmq->epTimer == NULL) { + code = TSDB_CODE_TSC_INTERNAL_ERROR; + goto END; + } } if (tmq->autoCommit && tmq->commitTimer == NULL){ tmq->commitTimer = taosTmrStart(tmqAssignDelayedCommitTask, tmq->autoCommitInterval, (void*)(tmq->refId), tmqMgmt.timer); - } - if (tmq->epTimer == NULL || tmq->commitTimer == NULL) { - code = TSDB_CODE_TSC_INTERNAL_ERROR; - goto END; + if (tmq->commitTimer == NULL) { + code = TSDB_CODE_TSC_INTERNAL_ERROR; + goto END; + } } END: