From 770c88200f297722c7459ddf6799e7c79d23ab7e Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Mon, 30 Oct 2023 09:19:31 +0800 Subject: [PATCH] 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