From 897fd5b8b5f0fe2b4ef01809b16cd179c95960d3 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Wed, 6 Sep 2023 10:15:41 +0800 Subject: [PATCH] fix:tmq close error because of same committed offset --- 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 0ec47a1cb3..3969a68fd1 100644 --- a/source/client/src/clientTmq.c +++ b/source/client/src/clientTmq.c @@ -982,7 +982,7 @@ int32_t tmq_unsubscribe(tmq_t* tmq) { } if (tmq->autoCommit) { int32_t rsp = tmq_commit_sync(tmq, NULL); - if (rsp != 0) { + if (rsp != 0 && rsp != TSDB_CODE_TMQ_SAME_COMMITTED_VALUE) { return rsp; } } @@ -2122,7 +2122,7 @@ int32_t tmq_consumer_close(tmq_t* tmq) { // if auto commit is set, commit before close consumer. Otherwise, do nothing. if (tmq->autoCommit) { int32_t rsp = tmq_commit_sync(tmq, NULL); - if (rsp != 0) { + if (rsp != 0 && rsp != TSDB_CODE_TMQ_SAME_COMMITTED_VALUE) { return rsp; } }