fix:remove using alarm when sending slow log & use one thread to send all slow log

This commit is contained in:
wangmm0220 2024-07-02 18:45:12 +08:00
parent 470796ae88
commit 44d81eab56
1 changed files with 3 additions and 1 deletions

View File

@ -659,7 +659,7 @@ static void monitorSendAllSlowLogFromTempDir(int64_t clusterId){
char filename[PATH_MAX] = {0};
snprintf(filename, sizeof(filename), "%s%s", tmpPath, name);
TdFilePtr pFile = taosOpenFile(filename, TD_FILE_READ | TD_FILE_TRUNC);
TdFilePtr pFile = taosOpenFile(filename, TD_FILE_READ | TD_FILE_WRITE);
if (pFile == NULL) {
uError("failed to open file:%s since %s", filename, terrstr());
continue;
@ -748,6 +748,8 @@ static void* monitorThreadFunc(void *param){
}else if(slowLogData->type == SLOW_LOG_READ_QUIT){
if(monitorSendSlowLogAtQuit(slowLogData->clusterId)){
uInfo("monitorThreadFunc quit since all slow log sended");
monitorFreeSlowLogData(slowLogData);
taosFreeQitem(slowLogData);
break;
}
}