fix:[TS-4921]refactor reporting logic for slow log
This commit is contained in:
parent
3b6cb21771
commit
470796ae88
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue