From 2bc4077069f6c3cc76d065454256cefd7c343c9c Mon Sep 17 00:00:00 2001 From: haojun Liao Date: Thu, 14 Jan 2021 15:54:43 +0800 Subject: [PATCH 1/4] Update tscSubquery.c avoid repeated subtraction of the number of subqueries. --- src/client/src/tscSubquery.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/client/src/tscSubquery.c b/src/client/src/tscSubquery.c index a00ea68bd0..2622246111 100644 --- a/src/client/src/tscSubquery.c +++ b/src/client/src/tscSubquery.c @@ -1372,13 +1372,6 @@ void tscJoinQueryCallback(void* param, TAOS_RES* tres, int code) { // retrieve actual query results from vnode during the second stage join subquery if (pParentSql->res.code != TSDB_CODE_SUCCESS) { tscError("%p abort query due to other subquery failure. code:%d, global code:%d", pSql, code, pParentSql->res.code); - - if (!(pTableMetaInfo->vgroupIndex > 0 && tscNonOrderedProjectionQueryOnSTable(pQueryInfo, 0))) { - if (atomic_sub_fetch_32(&pParentSql->subState.numOfRemain, 1) > 0) { - return; - } - } - quitAllSubquery(pParentSql, pSupporter); tscAsyncResultOnError(pParentSql); @@ -1391,13 +1384,6 @@ void tscJoinQueryCallback(void* param, TAOS_RES* tres, int code) { tscError("%p abort query, code:%s, global code:%s", pSql, tstrerror(code), tstrerror(pParentSql->res.code)); pParentSql->res.code = code; - - if (!(pTableMetaInfo->vgroupIndex > 0 && tscNonOrderedProjectionQueryOnSTable(pQueryInfo, 0))) { - if (atomic_sub_fetch_32(&pParentSql->subState.numOfRemain, 1) > 0) { - return; - } - } - quitAllSubquery(pParentSql, pSupporter); tscAsyncResultOnError(pParentSql); From 555ad599f72b8c74adc378d7d988b82a3565cc58 Mon Sep 17 00:00:00 2001 From: Minglei Jin Date: Thu, 14 Jan 2021 16:05:27 +0800 Subject: [PATCH 2/4] [TD-2756]: correct docstring in taos.cfg --- packaging/cfg/taos.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packaging/cfg/taos.cfg b/packaging/cfg/taos.cfg index 73fa915abd..210a168e0d 100644 --- a/packaging/cfg/taos.cfg +++ b/packaging/cfg/taos.cfg @@ -162,10 +162,10 @@ # stop writing logs when the disk size of the log folder is less than this value # minimalLogDirGB 0.1 -# stop writing temporary files when the disk size of the log folder is less than this value +# stop writing temporary files when the disk size of the tmp folder is less than this value # minimalTmpDirGB 0.1 -# stop writing data when the disk size of the log folder is less than this value +# if disk free space is less than this value, taosd service exit directly within startup process # minimalDataDirGB 0.1 # One mnode is equal to the number of vnode consumed From bd99bde945694494554c35352223f925b518700a Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Thu, 14 Jan 2021 16:18:37 +0800 Subject: [PATCH 3/4] [TD-2752]: check if the FILE pointer is valid or not. --- src/query/src/qExecutor.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/query/src/qExecutor.c b/src/query/src/qExecutor.c index 261ba86bda..8b708f5ce1 100644 --- a/src/query/src/qExecutor.c +++ b/src/query/src/qExecutor.c @@ -6928,11 +6928,12 @@ static size_t getResultSize(SQInfo *pQInfo, int64_t *numOfRows) { */ if (isTSCompQuery(pQuery) && (*numOfRows) > 0) { struct stat fStat; - if (fstat(fileno(*(FILE **)pQuery->sdata[0]->data), &fStat) == 0) { + FILE *f = *(FILE **)pQuery->sdata[0]->data; + if ((f != NULL) && (fstat(fileno(f), &fStat) == 0)) { *numOfRows = fStat.st_size; return fStat.st_size; } else { - qError("QInfo:%p failed to get file info, path:%s, reason:%s", pQInfo, pQuery->sdata[0]->data, strerror(errno)); + qError("QInfo:%p failed to get file info, file:%p, reason:%s", pQInfo, f, strerror(errno)); return 0; } } else { @@ -6947,7 +6948,7 @@ static int32_t doDumpQueryResult(SQInfo *pQInfo, char *data) { // load data from file to msg buffer if (isTSCompQuery(pQuery)) { - FILE *f = *(FILE **)pQuery->sdata[0]->data; + FILE *f = *(FILE **)pQuery->sdata[0]->data; // TODO refactor // make sure file exist if (f) { From 5272d8e305eeffba2c2f4aa02a5dc62b8d2f4fa0 Mon Sep 17 00:00:00 2001 From: Minglei Jin Date: Thu, 14 Jan 2021 16:41:35 +0800 Subject: [PATCH 4/4] [TD-2606]: enlarge TSDB_MAX_WAL_SIZE from 2M to 3M --- src/inc/taosdef.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/inc/taosdef.h b/src/inc/taosdef.h index 9a52cb3bee..7b336aadcb 100644 --- a/src/inc/taosdef.h +++ b/src/inc/taosdef.h @@ -451,7 +451,7 @@ int32_t tStrToInteger(const char* z, int16_t type, int32_t n, int64_t* value, bo #define TSDB_PORT_HTTP 11 #define TSDB_PORT_ARBITRATOR 12 -#define TSDB_MAX_WAL_SIZE (1024*1024*2) +#define TSDB_MAX_WAL_SIZE (1024*1024*3) typedef enum { TAOS_QTYPE_RPC = 0,