From 70f86af71141f3d2b46827abf51e808b8a59520d Mon Sep 17 00:00:00 2001 From: dapan1121 Date: Mon, 29 Aug 2022 16:57:59 +0800 Subject: [PATCH 1/5] fix: fix heartbeat crash issue --- source/client/src/clientHb.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/client/src/clientHb.c b/source/client/src/clientHb.c index 9475d1b51e..56e3527f96 100644 --- a/source/client/src/clientHb.c +++ b/source/client/src/clientHb.c @@ -145,7 +145,7 @@ static int32_t hbProcessStbInfoRsp(void *value, int32_t valueLen, struct SCatalo } static int32_t hbQueryHbRspHandle(SAppHbMgr *pAppHbMgr, SClientHbRsp *pRsp) { - SClientHbReq *pReq = taosHashGet(pAppHbMgr->activeInfo, &pRsp->connKey, sizeof(SClientHbKey)); + SClientHbReq *pReq = taosHashAcquire(pAppHbMgr->activeInfo, &pRsp->connKey, sizeof(SClientHbKey)); if (NULL == pReq) { tscWarn("pReq to get activeInfo, may be dropped, refId:%" PRIx64 ", type:%d", pRsp->connKey.tscRid, pRsp->connKey.connType); @@ -260,6 +260,8 @@ static int32_t hbQueryHbRspHandle(SAppHbMgr *pAppHbMgr, SClientHbRsp *pRsp) { } } + taosHashRelease(pAppHbMgr->activeInfo, pReq); + return TSDB_CODE_SUCCESS; } @@ -914,10 +916,11 @@ int hbRegisterConn(SAppHbMgr *pAppHbMgr, int64_t tscRefId, int64_t clusterId, in } void hbDeregisterConn(SAppHbMgr *pAppHbMgr, SClientHbKey connKey) { - SClientHbReq *pReq = taosHashGet(pAppHbMgr->activeInfo, &connKey, sizeof(SClientHbKey)); + SClientHbReq *pReq = taosHashAcquire(pAppHbMgr->activeInfo, &connKey, sizeof(SClientHbKey)); if (pReq) { tFreeClientHbReq(pReq); taosHashRemove(pAppHbMgr->activeInfo, &connKey, sizeof(SClientHbKey)); + taosHashRelease(pAppHbMgr->activeInfo, pReq); } if (NULL == pReq) { From 205299e532a556c2cf0df0db81044351abe32b7e Mon Sep 17 00:00:00 2001 From: dapan1121 Date: Mon, 29 Aug 2022 17:46:34 +0800 Subject: [PATCH 2/5] fix: fix taosd stmt query crash issue --- source/libs/parser/src/parser.c | 3 +-- tests/script/api/batchprepare.c | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/source/libs/parser/src/parser.c b/source/libs/parser/src/parser.c index 7e27132f3c..7ee6a5b223 100644 --- a/source/libs/parser/src/parser.c +++ b/source/libs/parser/src/parser.c @@ -136,8 +136,7 @@ static int32_t setValueByBindParam(SValueNode* pVal, TAOS_MULTI_BIND* pParam) { } static EDealRes rewriteQueryExprAliasImpl(SNode* pNode, void* pContext) { - if (nodesIsExprNode(pNode) && QUERY_NODE_COLUMN != nodeType(pNode) && '\0' == ((SExprNode*)pNode)->userAlias[0]) { - strcpy(((SExprNode*)pNode)->userAlias, ((SExprNode*)pNode)->aliasName); + if (nodesIsExprNode(pNode) && QUERY_NODE_COLUMN != nodeType(pNode)) { sprintf(((SExprNode*)pNode)->aliasName, "#%d", *(int32_t*)pContext); ++(*(int32_t*)pContext); } diff --git a/tests/script/api/batchprepare.c b/tests/script/api/batchprepare.c index ada2039460..f39d5e6528 100644 --- a/tests/script/api/batchprepare.c +++ b/tests/script/api/batchprepare.c @@ -2598,7 +2598,6 @@ void runAll(TAOS *taos) { printf("%s Begin\n", gCaseCtrl.caseCatalog); runCaseList(taos); -#if 0 strcpy(gCaseCtrl.caseCatalog, "Micro DB precision Test"); printf("%s Begin\n", gCaseCtrl.caseCatalog); gCaseCtrl.precision = TIME_PRECISION_MICRO; @@ -2654,7 +2653,6 @@ void runAll(TAOS *taos) { gCaseCtrl.bindColNum = 6; runCaseList(taos); gCaseCtrl.bindColNum = 0; -#endif /* strcpy(gCaseCtrl.caseCatalog, "Bind Col Type Test"); From 808545ca7fa45bdab421329dcd7804d25da4319c Mon Sep 17 00:00:00 2001 From: gccgdb1234 Date: Mon, 29 Aug 2022 18:39:40 +0800 Subject: [PATCH 3/5] doc: refine the title and label of grant page --- docs/en/12-taos-sql/25-grant.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/en/12-taos-sql/25-grant.md b/docs/en/12-taos-sql/25-grant.md index 37438ee780..b9a3fa2321 100644 --- a/docs/en/12-taos-sql/25-grant.md +++ b/docs/en/12-taos-sql/25-grant.md @@ -1,6 +1,7 @@ --- -sidebar_label: Permissions Management -title: Permissions Management +sidebar_label: Access Control +title: User and Access Control +description: Manage user and user's permission --- This document describes how to manage permissions in TDengine. From 15cf8f04d97ae7183fa82401e794da6faabdd5ec Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Mon, 29 Aug 2022 18:43:43 +0800 Subject: [PATCH 4/5] fix: 3.0 asserts download path (#16490) * fix: docker script permisison * fix: assets-download path --- packaging/docker/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packaging/docker/README.md b/packaging/docker/README.md index cb27d3bca6..763ab73724 100644 --- a/packaging/docker/README.md +++ b/packaging/docker/README.md @@ -158,7 +158,7 @@ When you build your application with docker, you should add the TDengine client FROM ubuntu:20.04 RUN apt-get update && apt-get install -y wget ENV TDENGINE_VERSION=2.4.0.0 -RUN wget -c https://www.taosdata.com/assets-download/TDengine-client-${TDENGINE_VERSION}-Linux-x64.tar.gz \ +RUN wget -c https://www.taosdata.com/assets-download/3.0/TDengine-client-${TDENGINE_VERSION}-Linux-x64.tar.gz \ && tar xvf TDengine-client-${TDENGINE_VERSION}-Linux-x64.tar.gz \ && cd TDengine-client-${TDENGINE_VERSION} \ && ./install_client.sh \ @@ -265,7 +265,7 @@ Full version of dockerfile could be: ```dockerfile FROM golang:1.17.6-buster as builder ENV TDENGINE_VERSION=2.4.0.0 -RUN wget -c https://www.taosdata.com/assets-download/TDengine-client-${TDENGINE_VERSION}-Linux-x64.tar.gz \ +RUN wget -c https://www.taosdata.com/assets-download/3.0/TDengine-client-${TDENGINE_VERSION}-Linux-x64.tar.gz \ && tar xvf TDengine-client-${TDENGINE_VERSION}-Linux-x64.tar.gz \ && cd TDengine-client-${TDENGINE_VERSION} \ && ./install_client.sh \ @@ -279,7 +279,7 @@ RUN go env && go mod tidy && go build FROM ubuntu:20.04 RUN apt-get update && apt-get install -y wget ENV TDENGINE_VERSION=2.4.0.0 -RUN wget -c https://www.taosdata.com/assets-download/TDengine-client-${TDENGINE_VERSION}-Linux-x64.tar.gz \ +RUN wget -c https://www.taosdata.com/assets-download/3.0/TDengine-client-${TDENGINE_VERSION}-Linux-x64.tar.gz \ && tar xvf TDengine-client-${TDENGINE_VERSION}-Linux-x64.tar.gz \ && cd TDengine-client-${TDENGINE_VERSION} \ && ./install_client.sh \ From 2be26326001036347d0a8c8688bc6e13c3703f03 Mon Sep 17 00:00:00 2001 From: tomchon Date: Mon, 29 Aug 2022 19:02:59 +0800 Subject: [PATCH 5/5] test: modify checkpackages scritps --- packaging/MPtestJenkinsfile | 8 ++++---- packaging/testpackage.sh | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packaging/MPtestJenkinsfile b/packaging/MPtestJenkinsfile index 5e259d56be..a003bf354c 100644 --- a/packaging/MPtestJenkinsfile +++ b/packaging/MPtestJenkinsfile @@ -107,7 +107,7 @@ pipeline { stage('ubuntu16') { agent{label " ubuntu16 "} steps { - timeout(time: 10, unit: 'MINUTES'){ + timeout(time: 30, unit: 'MINUTES'){ sync_source("${BRANCH_NAME}") sh ''' cd ${TDENGINE_ROOT_DIR}/packaging @@ -130,7 +130,7 @@ pipeline { stage('ubuntu18') { agent{label " ubuntu18 "} steps { - timeout(time: 10, unit: 'MINUTES'){ + timeout(time: 30, unit: 'MINUTES'){ sync_source("${BRANCH_NAME}") sh ''' cd ${TDENGINE_ROOT_DIR}/packaging @@ -153,7 +153,7 @@ pipeline { stage('centos7') { agent{label " centos7_9 "} steps { - timeout(time: 10, unit: 'MINUTES'){ + timeout(time: 30, unit: 'MINUTES'){ sync_source("${BRANCH_NAME}") sh ''' cd ${TDENGINE_ROOT_DIR}/packaging @@ -176,7 +176,7 @@ pipeline { stage('centos8') { agent{label " centos8_3 "} steps { - timeout(time: 10, unit: 'MINUTES'){ + timeout(time: 30, unit: 'MINUTES'){ sync_source("${BRANCH_NAME}") sh ''' cd ${TDENGINE_ROOT_DIR}/packaging diff --git a/packaging/testpackage.sh b/packaging/testpackage.sh index 669b0c9e1e..054c24eb5d 100755 --- a/packaging/testpackage.sh +++ b/packaging/testpackage.sh @@ -83,8 +83,10 @@ wget https://www.taosdata.com/assets-download/3.0/${originPackageName} if [[ ${packgeName} =~ "deb" ]];then + cd ${installPath} echo "dpkg ${packgeName}" && dpkg -i ${packgeName} elif [[ ${packgeName} =~ "rpm" ]];then + cd ${installPath} echo "rpm ${packgeName}" && rpm -ivh ${packgeName} elif [[ ${packgeName} =~ "tar" ]];then echo "tar ${packgeName}" && tar -xvf ${packgeName}