fix:remove using alarm when sending slow log & use one thread to send all slow log
This commit is contained in:
parent
470796ae88
commit
44d81eab56
|
@ -659,7 +659,7 @@ static void monitorSendAllSlowLogFromTempDir(int64_t clusterId){
|
||||||
|
|
||||||
char filename[PATH_MAX] = {0};
|
char filename[PATH_MAX] = {0};
|
||||||
snprintf(filename, sizeof(filename), "%s%s", tmpPath, name);
|
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) {
|
if (pFile == NULL) {
|
||||||
uError("failed to open file:%s since %s", filename, terrstr());
|
uError("failed to open file:%s since %s", filename, terrstr());
|
||||||
continue;
|
continue;
|
||||||
|
@ -748,6 +748,8 @@ static void* monitorThreadFunc(void *param){
|
||||||
}else if(slowLogData->type == SLOW_LOG_READ_QUIT){
|
}else if(slowLogData->type == SLOW_LOG_READ_QUIT){
|
||||||
if(monitorSendSlowLogAtQuit(slowLogData->clusterId)){
|
if(monitorSendSlowLogAtQuit(slowLogData->clusterId)){
|
||||||
uInfo("monitorThreadFunc quit since all slow log sended");
|
uInfo("monitorThreadFunc quit since all slow log sended");
|
||||||
|
monitorFreeSlowLogData(slowLogData);
|
||||||
|
taosFreeQitem(slowLogData);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue