fix/TS-5532-set-seperate-thread-update-status-fix-case

This commit is contained in:
dmchen 2024-10-21 03:52:42 +00:00
parent 2437030f1a
commit 9d2b4eba5a
1 changed files with 14 additions and 0 deletions

View File

@ -47,6 +47,7 @@ static void *dmStatusThreadFp(void *param) {
return NULL;
}
extern SMonVloadInfo tsVinfo;
static void *dmStatusInfoThreadFp(void *param) {
SDnodeMgmt *pMgmt = param;
int64_t lastTime = taosGetTimestampMs();
@ -73,6 +74,19 @@ static void *dmStatusInfoThreadFp(void *param) {
}
}
if (taosThreadMutexLock(&pMgmt->pData->statusInfolock) != 0) {
dError("failed to lock status info lock");
return NULL;
}
if (tsVinfo.pVloads != NULL) {
taosArrayDestroy(tsVinfo.pVloads);
tsVinfo.pVloads = NULL;
}
if (taosThreadMutexUnlock(&pMgmt->pData->statusInfolock) != 0) {
dError("failed to unlock status info lock");
return NULL;
}
return NULL;
}