update test case

This commit is contained in:
yihaoDeng 2024-12-15 12:16:24 +08:00
parent 820d8cd454
commit 0922b28123
3 changed files with 17 additions and 3 deletions

View File

@ -797,6 +797,7 @@ void stopAllQueries(SRequestObj *pRequest) {
void crashReportThreadFuncUnexpectedStopped(void) { atomic_store_32(&clientStop, -1); }
static void *tscCrashReportThreadFp(void *param) {
int32_t code = 0;
setThreadName("client-crashReport");
char filepath[PATH_MAX] = {0};
(void)snprintf(filepath, sizeof(filepath), "%s%s.taosCrashLog", tsLogDir, TD_DIRSEP);
@ -818,7 +819,11 @@ static void *tscCrashReportThreadFp(void *param) {
return NULL;
}
STelemAddrMgmt mgt;
taosTelemetryMgtInit(&mgt, tsTelemServer);
code = taosTelemetryMgtInit(&mgt, tsTelemServer);
if (code) {
tscError("failed to init telemetry management, code:%s", tstrerror(code));
return NULL;
}
while (1) {
if (clientStop > 0) break;

View File

@ -232,6 +232,7 @@ static void *dmAuditThreadFp(void *param) {
}
static void *dmCrashReportThreadFp(void *param) {
int32_t code = 0;
SDnodeMgmt *pMgmt = param;
int64_t lastTime = taosGetTimestampMs();
setThreadName("dnode-crashReport");
@ -246,7 +247,11 @@ static void *dmCrashReportThreadFp(void *param) {
int32_t loopTimes = reportPeriodNum;
STelemAddrMgmt mgt = {0};
taosTelemetryMgtInit(&mgt, tsTelemServer);
code = taosTelemetryMgtInit(&mgt, tsTelemServer);
if (code != 0) {
dError("failed to init telemetry since %s", tstrerror(code));
return NULL;
}
while (1) {
if (pMgmt->pData->dropped || pMgmt->pData->stopped) break;

View File

@ -163,7 +163,11 @@ int32_t mndInitTelem(SMnode* pMnode) {
(void)taosThreadMutexInit(&pMgmt->lock, NULL);
if ((code = taosGetEmail(pMgmt->email, sizeof(pMgmt->email))) != 0)
mWarn("failed to get email since %s", tstrerror(code));
taosTelemetryMgtInit(&pMgmt->addrMgt, tsTelemServer);
code = taosTelemetryMgtInit(&pMgmt->addrMgt, tsTelemServer);
if (code != 0) {
mError("failed to init telemetry management since %s", tstrerror(code));
return code;
}
mndSetMsgHandle(pMnode, TDMT_MND_TELEM_TIMER, mndProcessTelemTimer);
return 0;