From 770c88200f297722c7459ddf6799e7c79d23ab7e Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Mon, 30 Oct 2023 09:19:31 +0800 Subject: [PATCH 1/6] fix:print log if assert & check epoch when update epoch --- source/client/src/clientTmq.c | 2 +- source/util/src/tlog.c | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/source/client/src/clientTmq.c b/source/client/src/clientTmq.c index 23b89286f6..f3e429424b 100644 --- a/source/client/src/clientTmq.c +++ b/source/client/src/clientTmq.c @@ -1451,7 +1451,7 @@ static bool doUpdateLocalEp(tmq_t* tmq, int32_t epoch, const SMqAskEpRsp* pRsp) bool set = false; int32_t topicNumGet = taosArrayGetSize(pRsp->topics); - if (topicNumGet <= 0 && epoch <= tmq->epoch) { + if (epoch <= tmq->epoch) { tscInfo("consumer:0x%" PRIx64 " no update ep epoch from %d to epoch %d, incoming topics:%d", tmq->consumerId, tmq->epoch, epoch, topicNumGet); return false; diff --git a/source/util/src/tlog.c b/source/util/src/tlog.c index b858421e25..6fc0c15cec 100644 --- a/source/util/src/tlog.c +++ b/source/util/src/tlog.c @@ -795,7 +795,12 @@ static void *taosAsyncOutputLog(void *param) { updateCron = 0; } - if (pLogBuf->stop || pSlowBuf->stop) break; + if (pLogBuf->stop || pSlowBuf->stop) { + pLogBuf->lastDuration = LOG_MAX_WAIT_MSEC; + taosWriteLog(pLogBuf); + taosWriteLog(pSlowBuf); + break; + } } return NULL; @@ -822,7 +827,7 @@ bool taosAssertDebug(bool condition, const char *file, int32_t line, const char taosPrintTrace(flags, level, dflag, -1); if (tsAssert) { - // taosCloseLog(); + taosCloseLog(); taosMsleep(300); #ifdef NDEBUG From bb8b65da1ea371ec0ef4ee97e9f43b57bc863823 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Mon, 30 Oct 2023 10:03:51 +0800 Subject: [PATCH 2/6] fix:open test cases --- utils/test/c/sml_test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/test/c/sml_test.c b/utils/test/c/sml_test.c index 64da4f83e3..9153706d23 100644 --- a/utils/test/c/sml_test.c +++ b/utils/test/c/sml_test.c @@ -1678,8 +1678,8 @@ int main(int argc, char *argv[]) { ASSERT(!ret); ret = sml_td18789_Test(); ASSERT(!ret); -// ret = sml_td24070_Test(); -// ASSERT(!ret); + ret = sml_td24070_Test(); + ASSERT(!ret); ret = sml_td23881_Test(); ASSERT(ret); ret = sml_escape_Test(); From e1d8ef7315a33c476a1f58620bd85b0b57d825fb Mon Sep 17 00:00:00 2001 From: haoranchen Date: Tue, 31 Oct 2023 10:11:39 +0800 Subject: [PATCH 3/6] Update tmqVnodeTransform-stb.py --- tests/system-test/7-tmq/tmqVnodeTransform-stb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/system-test/7-tmq/tmqVnodeTransform-stb.py b/tests/system-test/7-tmq/tmqVnodeTransform-stb.py index 18c5f8880b..ec1331ae59 100644 --- a/tests/system-test/7-tmq/tmqVnodeTransform-stb.py +++ b/tests/system-test/7-tmq/tmqVnodeTransform-stb.py @@ -49,7 +49,7 @@ class TDTestCase: 'rowsPerTbl': 10000, 'batchNum': 10, 'startTs': 1640966400000, # 2022-01-01 00:00:00.000 - 'pollDelay': 30, + 'pollDelay': 60, 'showMsg': 1, 'showRow': 1, 'snapshot': 0} From e92460105ccd29953adc12a6c9c253d1fbddb712 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Tue, 31 Oct 2023 15:36:32 +0800 Subject: [PATCH 4/6] fix:print log if assert & check epoch when update epoch --- 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 f3e429424b..8c1346b637 100644 --- a/source/client/src/clientTmq.c +++ b/source/client/src/clientTmq.c @@ -1451,7 +1451,7 @@ static bool doUpdateLocalEp(tmq_t* tmq, int32_t epoch, const SMqAskEpRsp* pRsp) bool set = false; int32_t topicNumGet = taosArrayGetSize(pRsp->topics); - if (epoch <= tmq->epoch) { + if (epoch < tmq->epoch) { tscInfo("consumer:0x%" PRIx64 " no update ep epoch from %d to epoch %d, incoming topics:%d", tmq->consumerId, tmq->epoch, epoch, topicNumGet); return false; From fc228d65f26420071c5a3b096557261d4f9a7a52 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Tue, 31 Oct 2023 15:36:40 +0800 Subject: [PATCH 5/6] fix:print log if assert & check epoch when update epoch --- source/dnode/mnode/impl/src/mndScheduler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/dnode/mnode/impl/src/mndScheduler.c b/source/dnode/mnode/impl/src/mndScheduler.c index 2931f6be6b..5e8ed80bd9 100644 --- a/source/dnode/mnode/impl/src/mndScheduler.c +++ b/source/dnode/mnode/impl/src/mndScheduler.c @@ -722,7 +722,7 @@ int32_t mndSchedInitSubEp(SMnode* pMnode, const SMqTopicObj* pTopic, SMqSubscrib pVgEp->vgId = pVgroup->vgId; taosArrayPush(pSub->unassignedVgs, &pVgEp); - mDebug("init subscription %s for topic:%s assign vgId:%d", pSub->key, pTopic->name, pVgEp->vgId); + mInfo("init subscription %s for topic:%s assign vgId:%d", pSub->key, pTopic->name, pVgEp->vgId); sdbRelease(pSdb, pVgroup); } From 55e66eac3cc8164c8289cd5637874de7a503a394 Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Tue, 31 Oct 2023 20:47:08 +0800 Subject: [PATCH 6/6] fix:print log if assert & check epoch when update epoch --- 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 8c1346b637..6aebba7c02 100644 --- a/source/client/src/clientTmq.c +++ b/source/client/src/clientTmq.c @@ -1451,7 +1451,7 @@ static bool doUpdateLocalEp(tmq_t* tmq, int32_t epoch, const SMqAskEpRsp* pRsp) bool set = false; int32_t topicNumGet = taosArrayGetSize(pRsp->topics); - if (epoch < tmq->epoch) { + if (epoch < tmq->epoch || (epoch == tmq->epoch && topicNumGet == 0)) { tscInfo("consumer:0x%" PRIx64 " no update ep epoch from %d to epoch %d, incoming topics:%d", tmq->consumerId, tmq->epoch, epoch, topicNumGet); return false;