From f8695563f0da54c9279fa430b99db8a14d7fa5ac Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Tue, 1 Nov 2022 19:27:35 +0800 Subject: [PATCH] fix TD-19686 --- source/libs/executor/src/executor.c | 13 +++++++------ source/libs/function/src/tudf.c | 6 +++--- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/source/libs/executor/src/executor.c b/source/libs/executor/src/executor.c index 2964878a2c..1cf01c8661 100644 --- a/source/libs/executor/src/executor.c +++ b/source/libs/executor/src/executor.c @@ -321,7 +321,7 @@ static SArray* filterUnqualifiedTables(const SStreamScanInfo* pScanInfo, const S } int32_t qUpdateQualifiedTableId(qTaskInfo_t tinfo, const SArray* tableIdList, bool isAdd) { - SExecTaskInfo* pTaskInfo = (SExecTaskInfo*)tinfo; + SExecTaskInfo* pTaskInfo = (SExecTaskInfo*)tinfo; if (isAdd) { qDebug("add %d tables id into query list, %s", (int32_t)taosArrayGetSize(tableIdList), pTaskInfo->id.str); @@ -473,7 +473,7 @@ int32_t qCreateExecTask(SReadHandle* readHandle, int32_t vgId, uint64_t taskId, qDebug("subplan task create completed, TID:0x%" PRIx64 " QID:0x%" PRIx64, taskId, pSubplan->id.queryId); - _error: +_error: // if failed to add ref for all tables in this query, abort current query return code; } @@ -1027,10 +1027,11 @@ int32_t qStreamPrepareScan(qTaskInfo_t tinfo, STqOffsetVal* pOffset, int8_t subT if (pTableScanInfo->dataReader == NULL) { STableKeyInfo* pList = tableListGetInfo(pTaskInfo->pTableInfoList, 0); - int32_t num = tableListGetSize(pTaskInfo->pTableInfoList); + int32_t num = tableListGetSize(pTaskInfo->pTableInfoList); if (tsdbReaderOpen(pTableScanInfo->readHandle.vnode, &pTableScanInfo->cond, pList, num, - &pTableScanInfo->dataReader, NULL) < 0 || pTableScanInfo->dataReader == NULL) { + &pTableScanInfo->dataReader, NULL) < 0 || + pTableScanInfo->dataReader == NULL) { ASSERT(0); } } @@ -1071,14 +1072,14 @@ int32_t qStreamPrepareScan(qTaskInfo_t tinfo, STqOffsetVal* pOffset, int8_t subT initQueryTableDataCondForTmq(&pTaskInfo->streamInfo.tableCond, sContext, &mtInfo); pTaskInfo->streamInfo.tableCond.twindows.skey = pOffset->ts; - if (pTaskInfo->pTableInfoList == NULL) { + if (pTaskInfo->pTableInfoList == NULL) { pTaskInfo->pTableInfoList = tableListCreate(); } tableListAddTableInfo(pTaskInfo->pTableInfoList, mtInfo.uid, 0); STableKeyInfo* pList = tableListGetInfo(pTaskInfo->pTableInfoList, 0); - int32_t size = tableListGetSize(pTaskInfo->pTableInfoList); + int32_t size = tableListGetSize(pTaskInfo->pTableInfoList); ASSERT(size == 1); tsdbReaderOpen(pInfo->vnode, &pTaskInfo->streamInfo.tableCond, pList, size, &pInfo->dataReader, NULL); diff --git a/source/libs/function/src/tudf.c b/source/libs/function/src/tudf.c index 459ee583a4..c83f397aa1 100644 --- a/source/libs/function/src/tudf.c +++ b/source/libs/function/src/tudf.c @@ -122,11 +122,11 @@ static int32_t udfSpawnUdfd(SUdfdData *pData) { taosGetCpuCores(&numCpuCores); snprintf(thrdPoolSizeEnvItem, 32, "%s=%d", "UV_THREADPOOL_SIZE", (int)numCpuCores * 2); - char pathTaosdLdLib[512] = {0}; + char pathTaosdLdLib[512] = {0}; size_t taosdLdLibPathLen = sizeof(pathTaosdLdLib); uv_os_getenv("LD_LIBRARY_PATH", pathTaosdLdLib, &taosdLdLibPathLen); - char udfdPathLdLib[1024] = {0}; + char udfdPathLdLib[1024] = {0}; size_t udfdLdLibPathLen = strlen(tsUdfdLdLibPath); strncpy(udfdPathLdLib, tsUdfdLdLibPath, udfdLdLibPathLen); udfdPathLdLib[udfdLdLibPathLen] = ':'; @@ -359,7 +359,7 @@ typedef struct SUdfcProxy { SArray *udfStubs; // SUdfcFuncStub uv_mutex_t udfcUvMutex; - int8_t initialized; + int8_t initialized; } SUdfcProxy; SUdfcProxy gUdfcProxy = {0};