From a58ba79046dc37967cd2b7850526ecd00e139e22 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Thu, 27 Jun 2024 00:01:07 +0800 Subject: [PATCH] fix:[TS-4921] errors in test --- source/client/src/clientMonitor.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/client/src/clientMonitor.c b/source/client/src/clientMonitor.c index c7e65eaf76..9e990dd545 100644 --- a/source/client/src/clientMonitor.c +++ b/source/client/src/clientMonitor.c @@ -568,6 +568,7 @@ static void* monitorThreadFunc(void *param){ uError("open queue error since %s", terrstr()); return NULL; } + uDebug("monitorThreadFunc start"); while (1) { if (slowLogFlag > 0) break; @@ -665,6 +666,9 @@ int32_t monitorPutData2MonitorQueue(int64_t clusterId, char* value){ slowLogData->clusterId = clusterId; slowLogData->value = value; uDebug("[monitor] write slow log to queue, clusterId:%"PRIx64 " value:%s", slowLogData->clusterId, slowLogData->value); + while (monitorQueue == NULL) { + taosMsleep(100); + } if (taosWriteQitem(monitorQueue, slowLogData) == 0){ tsem2_post(&monitorSem); }else{