From 1d91252188ebf3e8da2531d66cbec7151f3bb68b Mon Sep 17 00:00:00 2001 From: kailixu Date: Tue, 24 Dec 2024 18:10:29 +0800 Subject: [PATCH] enh: test coverage of tlog --- source/util/src/tlog.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/source/util/src/tlog.c b/source/util/src/tlog.c index 2f0c14ab9f..053ade2d5e 100644 --- a/source/util/src/tlog.c +++ b/source/util/src/tlog.c @@ -101,10 +101,8 @@ bool tsLogEmbedded = 0; bool tsAsyncLog = true; #ifdef ASSERT_NOT_CORE bool tsAssert = false; -#define LOG_BUFFER_WAIT_SEC 20 #else bool tsAssert = true; -#define LOG_BUFFER_WAIT_SEC 2 #endif int32_t tsNumOfLogLines = 10000000; int32_t tsLogKeepDays = 0; @@ -444,7 +442,7 @@ static OldFileKeeper *taosOpenNewFile() { static void *taosThreadToCloseOldFile(void *param) { if (!param) return NULL; OldFileKeeper *oldFileKeeper = (OldFileKeeper *)param; - taosSsleep(LOG_BUFFER_WAIT_SEC); + taosSsleep(20); taosWLockLatch(&tsLogRotateLatch); taosCloseLogByFd(oldFileKeeper->pOldFile); taosKeepOldLog(oldFileKeeper->keepName);