Merge pull request #26756 from taosdata/fix/TD-30989-monitor
fix/TD-30989
This commit is contained in:
commit
7ece4acf5c
|
@ -15,11 +15,11 @@
|
|||
|
||||
#define _DEFAULT_SOURCE
|
||||
#include "monInt.h"
|
||||
#include "taos_monitor.h"
|
||||
#include "taoserror.h"
|
||||
#include "tglobal.h"
|
||||
#include "thttp.h"
|
||||
#include "ttime.h"
|
||||
#include "taos_monitor.h"
|
||||
#include "tglobal.h"
|
||||
|
||||
SMonitor tsMonitor = {0};
|
||||
char *tsMonUri = "/report";
|
||||
|
@ -54,8 +54,7 @@ int32_t monGetLogs(SMonLogs *logs) {
|
|||
taosArrayClear(tsMonitor.logs);
|
||||
taosThreadMutexUnlock(&tsMonitor.lock);
|
||||
if (logs->logs == NULL) {
|
||||
terrno = TSDB_CODE_OUT_OF_MEMORY;
|
||||
return -1;
|
||||
TAOS_RETURN(TSDB_CODE_OUT_OF_MEMORY);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -105,8 +104,7 @@ void monSetBmInfo(SMonBmInfo *pInfo) {
|
|||
int32_t monInit(const SMonCfg *pCfg) {
|
||||
tsMonitor.logs = taosArrayInit(16, sizeof(SMonLogItem));
|
||||
if (tsMonitor.logs == NULL) {
|
||||
terrno = TSDB_CODE_OUT_OF_MEMORY;
|
||||
return -1;
|
||||
TAOS_RETURN(TSDB_CODE_OUT_OF_MEMORY);
|
||||
}
|
||||
|
||||
tsMonitor.cfg = *pCfg;
|
||||
|
@ -146,6 +144,7 @@ static void monCleanupMonitorInfo(SMonInfo *pMonitor) {
|
|||
}
|
||||
|
||||
static SMonInfo *monCreateMonitorInfo() {
|
||||
terrno = 0;
|
||||
SMonInfo *pMonitor = taosMemoryCalloc(1, sizeof(SMonInfo));
|
||||
if (pMonitor == NULL) {
|
||||
terrno = TSDB_CODE_OUT_OF_MEMORY;
|
||||
|
@ -602,8 +601,7 @@ void monGenAndSendReport() {
|
|||
monGenLogJson(pMonitor);
|
||||
|
||||
monSendReport(pMonitor);
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
monGenClusterInfoTable(pMonitor);
|
||||
monGenVgroupInfoTable(pMonitor);
|
||||
monGenDnodeInfoTable(pMonitor);
|
||||
|
|
Loading…
Reference in New Issue