Merge pull request #16880 from taosdata/fix/addDebugInfo

fix: add debug info
This commit is contained in:
Shengliang Guan 2022-09-16 19:59:08 +08:00 committed by GitHub
commit 9f84cbea6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -275,6 +275,7 @@ void qwFreeTaskHandle(qTaskInfo_t *taskHandle) {
qTaskInfo_t otaskHandle = atomic_load_ptr(taskHandle); qTaskInfo_t otaskHandle = atomic_load_ptr(taskHandle);
if (otaskHandle && atomic_val_compare_exchange_ptr(taskHandle, otaskHandle, NULL)) { if (otaskHandle && atomic_val_compare_exchange_ptr(taskHandle, otaskHandle, NULL)) {
qDestroyTask(otaskHandle); qDestroyTask(otaskHandle);
qDebug("task handle destryed");
} }
} }
@ -305,6 +306,7 @@ void qwFreeTaskCtx(SQWTaskCtx *ctx) {
if (ctx->sinkHandle) { if (ctx->sinkHandle) {
dsDestroyDataSinker(ctx->sinkHandle); dsDestroyDataSinker(ctx->sinkHandle);
ctx->sinkHandle = NULL; ctx->sinkHandle = NULL;
qDebug("sink handle destryed");
} }
} }
@ -452,6 +454,10 @@ void qwDestroySchStatus(SQWSchStatus *pStatus) { taosHashCleanup(pStatus->tasksH
void qwDestroyImpl(void *pMgmt) { void qwDestroyImpl(void *pMgmt) {
SQWorker *mgmt = (SQWorker *)pMgmt; SQWorker *mgmt = (SQWorker *)pMgmt;
int8_t nodeType = mgmt->nodeType;
int32_t nodeId = mgmt->nodeId;
qDebug("start to destroy qworker, type:%d, id:%d, handle:%p", nodeType, nodeId, mgmt);
taosTmrStop(mgmt->hbTimer); taosTmrStop(mgmt->hbTimer);
mgmt->hbTimer = NULL; mgmt->hbTimer = NULL;
@ -484,6 +490,8 @@ void qwDestroyImpl(void *pMgmt) {
atomic_sub_fetch_32(&gQwMgmt.qwNum, 1); atomic_sub_fetch_32(&gQwMgmt.qwNum, 1);
qwCloseRef(); qwCloseRef();
qDebug("qworker destroyed, type:%d, id:%d, handle:%p", nodeType, nodeId, mgmt);
} }
int32_t qwOpenRef(void) { int32_t qwOpenRef(void) {