diff --git a/include/libs/monitor/clientMonitor.h b/include/libs/monitor/clientMonitor.h index aa6ee6c9fc..abf7df1031 100644 --- a/include/libs/monitor/clientMonitor.h +++ b/include/libs/monitor/clientMonitor.h @@ -35,7 +35,7 @@ typedef enum { SLOW_LOG_WRITE = 0, SLOW_LOG_READ_RUNNING = 1, SLOW_LOG_READ_BEGINNIG = 2, - SLOW_LOG_READ_QUIT = 2, + SLOW_LOG_READ_QUIT = 3, } SLOW_LOG_QUEUE_TYPE; #define SLOW_LOG_SEND_SIZE_MAX 128*1024*1024 diff --git a/source/client/src/clientMonitor.c b/source/client/src/clientMonitor.c index 320908e3de..3752aa64a4 100644 --- a/source/client/src/clientMonitor.c +++ b/source/client/src/clientMonitor.c @@ -717,11 +717,13 @@ static void* monitorThreadFunc(void *param){ if(quitCnt == 0){ monitorSendAllSlowLogAtQuit(); if(quitCnt == 0){ + uInfo("monitorThreadFunc quit since no slow log to send"); break; } quitTime = taosGetMonoTimestampMs(); } if(taosGetMonoTimestampMs() - quitTime > 500){ //quit at most 500ms + uInfo("monitorThreadFunc quit since timeout") break; } } @@ -745,6 +747,7 @@ static void* monitorThreadFunc(void *param){ monitorSendSlowLogAtRunning(slowLogData->clusterId); }else if(slowLogData->type == SLOW_LOG_READ_QUIT){ if(monitorSendSlowLogAtQuit(slowLogData->clusterId)){ + uInfo("monitorThreadFunc quit since all slow log sended"); break; } }