From a3498bacc9a8a82b6965831302a430c90847f47f Mon Sep 17 00:00:00 2001 From: Huo Linhe Date: Wed, 17 Apr 2024 10:03:52 +0800 Subject: [PATCH 01/17] fix: undefined reference to `psl_*` while linking s3 libcurl to taosd Environment: - os: Ubuntu 22.04 LTS - kernel: 5.19.0-051900rc8-generic #202207242130 SMP PREEMPT_DYNAMIC Sun Jul 24 21:34:04 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux Steps: ```bash ./build.sh ``` Error: ```txt [ 88%] Linking CXX executable ../../../../build/bin/taosd /usr/bin/ld: /home/huolinhe/.cos-local.2/lib/libcurl.a(libcurl_la-psl.o): in function `Curl_psl_destroy': psl.c:(.text+0x13): undefined reference to `psl_free' /usr/bin/ld: /home/huolinhe/.cos-local.2/lib/libcurl.a(libcurl_la-psl.o): in function `Curl_psl_use': psl.c:(.text+0xad): undefined reference to `psl_latest' /usr/bin/ld: psl.c:(.text+0xe4): undefined reference to `psl_free' /usr/bin/ld: psl.c:(.text+0xfc): undefined reference to `psl_builtin' /usr/bin/ld: /home/huolinhe/.cos-local.2/lib/libcurl.a(libcurl_la-cookie.o): in function `Curl_cookie_add': cookie.c:(.text+0x11a3): undefined reference to `psl_is_cookie_domain_acceptable' collect2: error: ld returned 1 exit status ``` Disable libpsl in curl will fix the errors. --- cmake/curl_CMakeLists.txt.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/curl_CMakeLists.txt.in b/cmake/curl_CMakeLists.txt.in index 197d978fb7..8e06569f4d 100644 --- a/cmake/curl_CMakeLists.txt.in +++ b/cmake/curl_CMakeLists.txt.in @@ -12,7 +12,7 @@ ExternalProject_Add(curl2 BUILD_IN_SOURCE TRUE BUILD_ALWAYS 1 UPDATE_COMMAND "" - CONFIGURE_COMMAND ./configure --prefix=$ENV{HOME}/.cos-local.2 --with-ssl=$ENV{HOME}/.cos-local.2 --enable-shared=no --disable-ldap --disable-ldaps --without-brotli --without-zstd --without-libidn2 --without-nghttp2 #--enable-debug + CONFIGURE_COMMAND ./configure --prefix=$ENV{HOME}/.cos-local.2 --with-ssl=$ENV{HOME}/.cos-local.2 --enable-shared=no --disable-ldap --disable-ldaps --without-brotli --without-zstd --without-libidn2 --without-nghttp2 --without-libpsl #--enable-debug BUILD_COMMAND make -j INSTALL_COMMAND make install TEST_COMMAND "" From 40442022b2cb7a6461a9846f3b485faba4616b8a Mon Sep 17 00:00:00 2001 From: Ping Xiao Date: Mon, 29 Apr 2024 15:40:02 +0800 Subject: [PATCH 02/17] fix issue in makepkg.sh --- packaging/tools/makepkg.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packaging/tools/makepkg.sh b/packaging/tools/makepkg.sh index 3744892526..5733c35ebe 100755 --- a/packaging/tools/makepkg.sh +++ b/packaging/tools/makepkg.sh @@ -101,6 +101,7 @@ else ${script_dir}/remove.sh \ ${script_dir}/set_core.sh \ ${script_dir}/startPre.sh \ + ${script_dir}/quick_deploy.sh \ ${script_dir}/taosd-dump-cfg.gdb" fi @@ -258,7 +259,7 @@ cp ${install_files} ${install_dir} cp ${install_dir}/install.sh install_temp.sh if [ "$verMode" == "cluster" ]; then sed -i 's/verMode=edge/verMode=cluster/g' install_temp.sh - sed -i "s/PREFIX=\"taos\"/PREFIX=\"${serverName2}\"/g" install_temp.sh + sed -i "s/PREFIX=\"taos\"/PREFIX=\"${clientName2}\"/g" install_temp.sh sed -i "s/productName=\"TDengine\"/productName=\"${productName2}\"/g" install_temp.sh cusDomain=`echo "${cusEmail2}" | sed 's/^[^@]*@//'` sed -i "s/emailName=\"taosdata.com\"/emailName=\"${cusDomain}\"/g" install_temp.sh From 5f6d3fcf7e07c290f4c65e3b9a56a5b83722af6b Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Mon, 6 May 2024 10:09:53 +0800 Subject: [PATCH 03/17] fix:[TD-29893]avoid returning 0 if vnode init error --- source/dnode/mgmt/mgmt_vnode/src/vmHandle.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/dnode/mgmt/mgmt_vnode/src/vmHandle.c b/source/dnode/mgmt/mgmt_vnode/src/vmHandle.c index 73a73d19f5..0295e88106 100644 --- a/source/dnode/mgmt/mgmt_vnode/src/vmHandle.c +++ b/source/dnode/mgmt/mgmt_vnode/src/vmHandle.c @@ -316,7 +316,7 @@ int32_t vmProcessCreateVnodeReq(SVnodeMgmt *pMgmt, SRpcMsg *pMsg) { if (vmTsmaAdjustDays(&vnodeCfg, &req) < 0) { dError("vgId:%d, failed to adjust tsma days since %s", req.vgId, terrstr()); - code = terrno; + code = terrno != 0 ? terrno : -1; goto _OVER; } @@ -344,21 +344,21 @@ int32_t vmProcessCreateVnodeReq(SVnodeMgmt *pMgmt, SRpcMsg *pMsg) { dError("vgId:%d, failed to create vnode since %s", req.vgId, terrstr()); vmReleaseVnode(pMgmt, pVnode); tFreeSCreateVnodeReq(&req); - code = terrno; + code = terrno != 0 ? terrno : -1; return code; } SVnode *pImpl = vnodeOpen(path, diskPrimary, pMgmt->pTfs, pMgmt->msgCb, true); if (pImpl == NULL) { dError("vgId:%d, failed to open vnode since %s", req.vgId, terrstr()); - code = terrno; + code = terrno != 0 ? terrno : -1; goto _OVER; } code = vmOpenVnode(pMgmt, &wrapperCfg, pImpl); if (code != 0) { dError("vgId:%d, failed to open vnode since %s", req.vgId, terrstr()); - code = terrno; + code = terrno != 0 ? terrno : code; goto _OVER; } @@ -379,7 +379,7 @@ int32_t vmProcessCreateVnodeReq(SVnodeMgmt *pMgmt, SRpcMsg *pMsg) { code = vmWriteVnodeListToFile(pMgmt); if (code != 0) { - code = terrno; + code = terrno != 0 ? terrno : code; goto _OVER; } From 3a4e8f08424f83aab76205c893dbdca3d5718124 Mon Sep 17 00:00:00 2001 From: factosea <285808407@qq.com> Date: Wed, 8 May 2024 17:38:58 +0800 Subject: [PATCH 04/17] fix: memleak --- source/util/src/tworker.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/util/src/tworker.c b/source/util/src/tworker.c index d2651c1d2c..07186331ae 100644 --- a/source/util/src/tworker.c +++ b/source/util/src/tworker.c @@ -224,6 +224,7 @@ static void *tAutoQWorkerThreadFp(SQueueWorker *worker) { taosUpdateItemSize(qinfo.queue, 1); } + DestoryThreadLocalRegComp(); return NULL; } From c54751e7e242ab9c41597fc372ec9d181f15c030 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Sat, 11 May 2024 11:11:09 +0800 Subject: [PATCH 05/17] fix(query): set the pk for interp query. --- source/libs/executor/src/timesliceoperator.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/libs/executor/src/timesliceoperator.c b/source/libs/executor/src/timesliceoperator.c index 080fd6b914..8440f51cb0 100644 --- a/source/libs/executor/src/timesliceoperator.c +++ b/source/libs/executor/src/timesliceoperator.c @@ -204,6 +204,11 @@ static bool checkDuplicateTimestamps(STimeSliceOperatorInfo* pSliceInfo, SColumn SRowKey cur = {.ts = currentTs, .numOfPKs = (pPkCol != NULL)? 1:0}; if (pPkCol != NULL) { cur.pks[0].type = pPkCol->info.type; + if (IS_VAR_DATA_TYPE(pPkCol->info.type)) { + cur.pks[0].pData = (uint8_t*)colDataGetVarData(pPkCol, rows); + } else { + memcpy(&cur.pks[0].val, colDataGetData(pPkCol, rows), pPkCol->info.bytes); + } } // let's discard the duplicated ts From 52350a6595bd0aa2d55ffc7a4ceed3ab71bdf5aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chappyguoxy=E2=80=9D?= <“happy_guoxy@163.com”> Date: Sat, 11 May 2024 13:46:16 +0800 Subject: [PATCH 06/17] add pk cases --- tests/parallel_test/cases.task | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/parallel_test/cases.task b/tests/parallel_test/cases.task index d9d16d1f57..3f8e3abac7 100644 --- a/tests/parallel_test/cases.task +++ b/tests/parallel_test/cases.task @@ -489,11 +489,11 @@ ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last+last_row.py -Q 2 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last+last_row.py -Q 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/last+last_row.py -Q 4 -#,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_1.py -#,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_1.py -R -#,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_1.py -Q 2 -#,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_1.py -Q 3 -#,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_1.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_1.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_1.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_1.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_1.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_1.py -Q 4 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_2.py ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_2.py -R ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_2.py -Q 2 From f030af3aab688659576ed3f13c967e5830e55b66 Mon Sep 17 00:00:00 2001 From: t_max <1172915550@qq.com> Date: Sat, 11 May 2024 14:59:05 +0800 Subject: [PATCH 07/17] fix: build fails on macOS and Windows --- cmake/xz_CMakeLists.txt.in | 7 ++----- cmake/zlib_CMakeLists.txt.in | 2 -- contrib/CMakeLists.txt | 4 ++++ include/libs/executor/storageapi.h | 2 +- include/os/osString.h | 4 ++++ source/client/CMakeLists.txt | 7 ------- source/client/src/clientHb.c | 2 +- source/dnode/mgmt/mgmt_snode/src/smWorker.c | 4 ++-- source/dnode/mgmt/mgmt_vnode/src/vmWorker.c | 8 ++++---- source/dnode/vnode/CMakeLists.txt | 3 +++ source/libs/executor/CMakeLists.txt | 3 +++ source/libs/executor/src/aggregateoperator.c | 2 +- source/libs/executor/src/sysscanoperator.c | 2 +- source/libs/function/src/udfd.c | 2 +- source/libs/monitorfw/CMakeLists.txt | 4 +++- source/libs/sync/src/syncMain.c | 2 +- tools/shell/src/shellEngine.c | 2 +- 17 files changed, 32 insertions(+), 28 deletions(-) diff --git a/cmake/xz_CMakeLists.txt.in b/cmake/xz_CMakeLists.txt.in index dc79974fda..e704fcbbbf 100644 --- a/cmake/xz_CMakeLists.txt.in +++ b/cmake/xz_CMakeLists.txt.in @@ -1,7 +1,5 @@ -# xz - -if (${TD_LINUX}) +# xz ExternalProject_Add(xz GIT_REPOSITORY https://github.com/xz-mirror/xz.git GIT_TAG v5.4.4 @@ -13,5 +11,4 @@ ExternalProject_Add(xz BUILD_COMMAND "" INSTALL_COMMAND "" TEST_COMMAND "" -) -endif() \ No newline at end of file +) \ No newline at end of file diff --git a/cmake/zlib_CMakeLists.txt.in b/cmake/zlib_CMakeLists.txt.in index 8f45ecc497..87a17c7377 100644 --- a/cmake/zlib_CMakeLists.txt.in +++ b/cmake/zlib_CMakeLists.txt.in @@ -2,7 +2,6 @@ # zlib -if (${TD_LINUX}) ExternalProject_Add(zlib GIT_REPOSITORY https://github.com/taosdata-contrib/zlib.git GIT_TAG v1.2.11 @@ -14,4 +13,3 @@ ExternalProject_Add(zlib INSTALL_COMMAND "" TEST_COMMAND "" ) -endif() diff --git a/contrib/CMakeLists.txt b/contrib/CMakeLists.txt index ccd60df19a..796b690d01 100644 --- a/contrib/CMakeLists.txt +++ b/contrib/CMakeLists.txt @@ -250,6 +250,10 @@ target_include_directories( # zlib set(CMAKE_PROJECT_INCLUDE_BEFORE "${TD_SUPPORT_DIR}/EnableCMP0048.txt.in") +if(${TD_DARWIN}) + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-error=deprecated-non-prototype") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=deprecated-non-prototype") +endif(${TD_DARWIN}) add_subdirectory(zlib EXCLUDE_FROM_ALL) target_include_directories( zlibstatic diff --git a/include/libs/executor/storageapi.h b/include/libs/executor/storageapi.h index ec92bd56dd..2d507ab6bb 100644 --- a/include/libs/executor/storageapi.h +++ b/include/libs/executor/storageapi.h @@ -270,7 +270,7 @@ typedef struct SStoreMeta { int32_t (*putCachedTableList)(void* pVnode, uint64_t suid, const void* pKey, int32_t keyLen, void* pPayload, int32_t payloadLen, double selectivityRatio); - void* (*storeGetIndexInfo)(); + void* (*storeGetIndexInfo)(void *pVnode); void* (*getInvertIndex)(void* pVnode); // support filter and non-filter cases. [vnodeGetCtbIdList & vnodeGetCtbIdListByFilter] int32_t (*getChildTableList)(void* pVnode, int64_t suid, SArray* list); diff --git a/include/os/osString.h b/include/os/osString.h index 1aca119293..ac7dd7eda8 100644 --- a/include/os/osString.h +++ b/include/os/osString.h @@ -22,7 +22,11 @@ extern "C" { typedef wchar_t TdWchar; typedef int32_t TdUcs4; +#if !defined(DISALLOW_NCHAR_WITHOUT_ICONV) && defined(DARWIN) +#include "iconv.h" +#else typedef void *iconv_t; +#endif typedef enum { M2C = 0, C2M } ConvType; // If the error is in a third-party library, place this header file under the third-party library header file. diff --git a/source/client/CMakeLists.txt b/source/client/CMakeLists.txt index a17c27c297..84747860e9 100644 --- a/source/client/CMakeLists.txt +++ b/source/client/CMakeLists.txt @@ -23,13 +23,6 @@ target_link_libraries( PRIVATE os util common transport monitor nodes parser command planner catalog scheduler function qcom geometry ) -if(TD_DARWIN_ARM64) - target_link_libraries( - taos - PRIVATE "-arch x86_64" - ) -endif() - if(TD_WINDOWS) INCLUDE_DIRECTORIES(jni/windows) INCLUDE_DIRECTORIES(jni/windows/win32) diff --git a/source/client/src/clientHb.c b/source/client/src/clientHb.c index 78e8b04a13..7d30a19140 100644 --- a/source/client/src/clientHb.c +++ b/source/client/src/clientHb.c @@ -738,7 +738,7 @@ static int32_t hbGetUserAuthInfo(SClientHbKey *connKey, SHbParam *param, SClient _return: releaseTscObj(connKey->tscRid); if (code) { - tscError("hb got user auth info failed since %s", terrstr(code)); + tscError("hb got user auth info failed since %s", tstrerror(code)); } return code; diff --git a/source/dnode/mgmt/mgmt_snode/src/smWorker.c b/source/dnode/mgmt/mgmt_snode/src/smWorker.c index 9220d3395d..1c57685414 100644 --- a/source/dnode/mgmt/mgmt_snode/src/smWorker.c +++ b/source/dnode/mgmt/mgmt_snode/src/smWorker.c @@ -37,7 +37,7 @@ static void smProcessWriteQueue(SQueueInfo *pInfo, STaosQall *qall, int32_t numO dTrace("msg:%p, get from snode-write queue", pMsg); int32_t code = sndProcessWriteMsg(pMgmt->pSnode, pMsg, NULL); if (code < 0) { - dGError("snd, msg:%p failed to process write since %s", pMsg, terrstr(code)); + dGError("snd, msg:%p failed to process write since %s", pMsg, tstrerror(code)); if (pMsg->info.handle != NULL) { tmsgSendRsp(pMsg); } @@ -58,7 +58,7 @@ static void smProcessStreamQueue(SQueueInfo *pInfo, SRpcMsg *pMsg) { dTrace("msg:%p, get from snode-stream queue", pMsg); int32_t code = sndProcessStreamMsg(pMgmt->pSnode, pMsg); if (code < 0) { - dGError("snd, msg:%p failed to process stream msg %s since %s", pMsg, TMSG_INFO(pMsg->msgType), terrstr(code)); + dGError("snd, msg:%p failed to process stream msg %s since %s", pMsg, TMSG_INFO(pMsg->msgType), tstrerror(code)); smSendRsp(pMsg, terrno); } diff --git a/source/dnode/mgmt/mgmt_vnode/src/vmWorker.c b/source/dnode/mgmt/mgmt_vnode/src/vmWorker.c index e4adfdb6b1..7b7c51bbc7 100644 --- a/source/dnode/mgmt/mgmt_vnode/src/vmWorker.c +++ b/source/dnode/mgmt/mgmt_vnode/src/vmWorker.c @@ -103,7 +103,7 @@ static void vmProcessStreamQueue(SQueueInfo *pInfo, SRpcMsg *pMsg) { if (code != 0) { if (terrno != 0) code = terrno; dGError("vgId:%d, msg:%p failed to process stream msg %s since %s", pVnode->vgId, pMsg, TMSG_INFO(pMsg->msgType), - terrstr(code)); + tstrerror(code)); vmSendRsp(pMsg, code); } @@ -201,7 +201,7 @@ static int32_t vmPutMsgToQueue(SVnodeMgmt *pMgmt, SRpcMsg *pMsg, EQueueType qtyp case QUERY_QUEUE: code = vnodePreprocessQueryMsg(pVnode->pImpl, pMsg); if (code) { - dError("vgId:%d, msg:%p preprocess query msg failed since %s", pVnode->vgId, pMsg, terrstr(code)); + dError("vgId:%d, msg:%p preprocess query msg failed since %s", pVnode->vgId, pMsg, tstrerror(code)); } else { dGTrace("vgId:%d, msg:%p put into vnode-query queue", pVnode->vgId, pMsg); taosWriteQitem(pVnode->pQueryQ, pMsg); @@ -219,13 +219,13 @@ static int32_t vmPutMsgToQueue(SVnodeMgmt *pMgmt, SRpcMsg *pMsg, EQueueType qtyp if (!vmDataSpaceSufficient(pVnode)) { terrno = TSDB_CODE_NO_ENOUGH_DISKSPACE; code = terrno; - dError("vgId:%d, msg:%p put into vnode-write queue failed since %s", pVnode->vgId, pMsg, terrstr(code)); + dError("vgId:%d, msg:%p put into vnode-write queue failed since %s", pVnode->vgId, pMsg, tstrerror(code)); break; } if (pMsg->msgType == TDMT_VND_SUBMIT && (grantCheck(TSDB_GRANT_STORAGE) != TSDB_CODE_SUCCESS)) { terrno = TSDB_CODE_VND_NO_WRITE_AUTH; code = terrno; - dDebug("vgId:%d, msg:%p put into vnode-write queue failed since %s", pVnode->vgId, pMsg, terrstr(code)); + dDebug("vgId:%d, msg:%p put into vnode-write queue failed since %s", pVnode->vgId, pMsg, tstrerror(code)); break; } if (pMsg->msgType != TDMT_VND_ALTER_CONFIRM && pVnode->disable) { diff --git a/source/dnode/vnode/CMakeLists.txt b/source/dnode/vnode/CMakeLists.txt index 43e680c382..d776271131 100644 --- a/source/dnode/vnode/CMakeLists.txt +++ b/source/dnode/vnode/CMakeLists.txt @@ -1,6 +1,9 @@ # vnode add_subdirectory(src/tqCommon) add_library(vnode STATIC "") +if(${TD_DARWIN}) + target_compile_options(vnode PRIVATE -Wno-error=single-bit-bitfield-constant-conversion) +endif(${TD_DARWIN}) set( VNODE_SOURCE_FILES "src/vnd/vnodeOpen.c" diff --git a/source/libs/executor/CMakeLists.txt b/source/libs/executor/CMakeLists.txt index 838233346e..8ba5f9a866 100644 --- a/source/libs/executor/CMakeLists.txt +++ b/source/libs/executor/CMakeLists.txt @@ -1,6 +1,9 @@ aux_source_directory(src EXECUTOR_SRC) add_library(executor STATIC ${EXECUTOR_SRC}) +if(${TD_DARWIN}) + target_compile_options(executor PRIVATE -Wno-error=deprecated-non-prototype) +endif(${TD_DARWIN}) target_link_libraries(executor PRIVATE os util common function parser planner qcom scalar nodes index wal tdb geometry diff --git a/source/libs/executor/src/aggregateoperator.c b/source/libs/executor/src/aggregateoperator.c index d0e1449188..b5a49831c5 100644 --- a/source/libs/executor/src/aggregateoperator.c +++ b/source/libs/executor/src/aggregateoperator.c @@ -484,7 +484,7 @@ int32_t doInitAggInfoSup(SAggSupporter* pAggSup, SqlFunctionCtx* pCtx, int32_t n if (!osTempSpaceAvailable()) { code = TSDB_CODE_NO_DISKSPACE; - qError("Init stream agg supporter failed since %s, key:%s, tempDir:%s", terrstr(code), pKey, tsTempDir); + qError("Init stream agg supporter failed since %s, key:%s, tempDir:%s", tstrerror(code), pKey, tsTempDir); return code; } diff --git a/source/libs/executor/src/sysscanoperator.c b/source/libs/executor/src/sysscanoperator.c index 16b0474f9c..db83c46155 100644 --- a/source/libs/executor/src/sysscanoperator.c +++ b/source/libs/executor/src/sysscanoperator.c @@ -549,7 +549,7 @@ static SSDataBlock* sysTableScanUserCols(SOperatorInfo* pOperator) { if (!pInfo->pCur || !pInfo->pSchema) { terrno = TSDB_CODE_OUT_OF_MEMORY; - qError("sysTableScanUserCols failed since %s", terrstr(terrno)); + qError("sysTableScanUserCols failed since %s", terrstr()); blockDataDestroy(pDataBlock); pInfo->loadInfo.totalRows = 0; return NULL; diff --git a/source/libs/function/src/udfd.c b/source/libs/function/src/udfd.c index c8eb7580ed..2a5e594ba3 100644 --- a/source/libs/function/src/udfd.c +++ b/source/libs/function/src/udfd.c @@ -842,7 +842,7 @@ void udfdGetFuncBodyPath(const SUdf *udf, char *path) { int32_t udfdSaveFuncBodyToFile(SFuncInfo *pFuncInfo, SUdf *udf) { if (!osDataSpaceAvailable()) { terrno = TSDB_CODE_NO_DISKSPACE; - fnError("udfd create shared library failed since %s", terrstr(terrno)); + fnError("udfd create shared library failed since %s", terrstr()); return terrno; } diff --git a/source/libs/monitorfw/CMakeLists.txt b/source/libs/monitorfw/CMakeLists.txt index 610cd63985..f08b2d6c2b 100644 --- a/source/libs/monitorfw/CMakeLists.txt +++ b/source/libs/monitorfw/CMakeLists.txt @@ -5,5 +5,7 @@ target_include_directories( PUBLIC "${TD_SOURCE_DIR}/include/libs/monitorfw" PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc" ) - +if(${TD_DARWIN}) + target_compile_options(monitorfw PRIVATE -Wno-error=deprecated-pragma) +endif(${TD_DARWIN}) target_link_libraries(monitorfw os util common transport) diff --git a/source/libs/sync/src/syncMain.c b/source/libs/sync/src/syncMain.c index fbdb5f4201..c7e654605b 100644 --- a/source/libs/sync/src/syncMain.c +++ b/source/libs/sync/src/syncMain.c @@ -463,7 +463,7 @@ _DEL_WAL: pSyncNode->snapshottingIndex, lastApplyIndex); } else { sNError(pSyncNode, "wal snapshot begin error since:%s, index:%" PRId64 ", last apply index:%" PRId64, - terrstr(terrno), pSyncNode->snapshottingIndex, lastApplyIndex); + terrstr(), pSyncNode->snapshottingIndex, lastApplyIndex); atomic_store_64(&pSyncNode->snapshottingIndex, SYNC_INDEX_INVALID); } diff --git a/tools/shell/src/shellEngine.c b/tools/shell/src/shellEngine.c index 57ed675303..1d1050c1ec 100644 --- a/tools/shell/src/shellEngine.c +++ b/tools/shell/src/shellEngine.c @@ -56,7 +56,7 @@ static void shellWriteHistory(); static void shellPrintError(TAOS_RES *tres, int64_t st); static bool shellIsCommentLine(char *line); static void shellSourceFile(const char *file); -static bool shellGetGrantInfo(); +static bool shellGetGrantInfo(char* buf); static void shellCleanup(void *arg); static void *shellCancelHandler(void *arg); From 55ac1770979cae332700e8a37bc93d49b6fce326 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Sat, 11 May 2024 15:50:05 +0800 Subject: [PATCH 08/17] fix:[TS-4658] make error msg specific --- source/libs/parser/src/parInsertUtil.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/source/libs/parser/src/parInsertUtil.c b/source/libs/parser/src/parInsertUtil.c index 6cd10f8a1f..5ad9feddbc 100644 --- a/source/libs/parser/src/parInsertUtil.c +++ b/source/libs/parser/src/parInsertUtil.c @@ -677,6 +677,11 @@ int rawBlockBindData(SQuery* query, STableMeta* pTableMeta, void* data, SVCreate p += sizeof(uint64_t); int8_t* fields = p; + if(*fields >= TSDB_DATA_TYPE_MAX || *fields < 0){ + uError("fields type error:%d", *fields); + ret = TSDB_CODE_INVALID_PARA; + goto end; + } p += numOfCols * (sizeof(int8_t) + sizeof(int32_t)); int32_t* colLength = (int32_t*)p; @@ -688,12 +693,12 @@ int rawBlockBindData(SQuery* query, STableMeta* pTableMeta, void* data, SVCreate SBoundColInfo* boundInfo = &pTableCxt->boundColsInfo; if (tFields != NULL && numFields != numOfCols) { - if (errstr != NULL) snprintf(errstr, errstrLen, "numFields:%d != raw numOfCols:%d", numFields, numOfCols); + if (errstr != NULL) snprintf(errstr, errstrLen, "numFields:%d not equal to data cols:%d", numFields, numOfCols); ret = TSDB_CODE_INVALID_PARA; goto end; } if (tFields != NULL && numFields > boundInfo->numOfBound) { - if (errstr != NULL) snprintf(errstr, errstrLen, "numFields:%d > boundInfo->numOfBound:%d", numFields, boundInfo->numOfBound); + if (errstr != NULL) snprintf(errstr, errstrLen, "numFields:%d bigger than num of bound cols:%d", numFields, boundInfo->numOfBound); ret = TSDB_CODE_INVALID_PARA; goto end; } @@ -702,8 +707,8 @@ int rawBlockBindData(SQuery* query, STableMeta* pTableMeta, void* data, SVCreate SSchema* pColSchema = &pSchema[j]; SColData* pCol = taosArrayGet(pTableCxt->pData->aCol, j); if (*fields != pColSchema->type && *(int32_t*)(fields + sizeof(int8_t)) != pColSchema->bytes) { - if (errstr != NULL) snprintf(errstr, errstrLen, "type or bytes not equal, id:%d, type:%d, raw type:%d. bytes:%d, raw bytes:%d", - pColSchema->colId, pColSchema->type, *fields, pColSchema->bytes, *(int32_t*)(fields + sizeof(int8_t))); + if (errstr != NULL) snprintf(errstr, errstrLen, "column type or bytes not equal, name:%s, schema type:%s, bytes:%d, data type:%s, bytes:%d", + pColSchema->name, tDataTypes[pColSchema->type].name, pColSchema->bytes, tDataTypes[*fields].name, *(int32_t*)(fields + sizeof(int8_t))); ret = TSDB_CODE_INVALID_PARA; goto end; } @@ -732,8 +737,8 @@ int rawBlockBindData(SQuery* query, STableMeta* pTableMeta, void* data, SVCreate SSchema* pColSchema = &pSchema[j]; if (strcmp(pColSchema->name, tFields[i].name) == 0) { if (*fields != pColSchema->type && *(int32_t*)(fields + sizeof(int8_t)) != pColSchema->bytes) { - if (errstr != NULL) snprintf(errstr, errstrLen, "type or bytes not equal, id:%d, type:%d, raw type:%d. bytes:%d, raw bytes:%d", - pColSchema->colId, pColSchema->type, *fields, pColSchema->bytes, *(int32_t*)(fields + sizeof(int8_t))); + if (errstr != NULL) snprintf(errstr, errstrLen, "column type or bytes not equal, name:%s, schema type:%s, bytes:%d, data type:%s, bytes:%d", + pColSchema->name, tDataTypes[pColSchema->type].name, pColSchema->bytes, tDataTypes[*fields].name, *(int32_t*)(fields + sizeof(int8_t))); ret = TSDB_CODE_INVALID_PARA; goto end; } From d32a80a87276f7895f421f2a18c54b2aa19ad4ce Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Sat, 11 May 2024 17:05:56 +0800 Subject: [PATCH 09/17] fix(query): set correct row index. --- source/libs/executor/src/timesliceoperator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/libs/executor/src/timesliceoperator.c b/source/libs/executor/src/timesliceoperator.c index 8440f51cb0..9a84127be6 100644 --- a/source/libs/executor/src/timesliceoperator.c +++ b/source/libs/executor/src/timesliceoperator.c @@ -205,9 +205,9 @@ static bool checkDuplicateTimestamps(STimeSliceOperatorInfo* pSliceInfo, SColumn if (pPkCol != NULL) { cur.pks[0].type = pPkCol->info.type; if (IS_VAR_DATA_TYPE(pPkCol->info.type)) { - cur.pks[0].pData = (uint8_t*)colDataGetVarData(pPkCol, rows); + cur.pks[0].pData = (uint8_t*)colDataGetVarData(pPkCol, curIndex); } else { - memcpy(&cur.pks[0].val, colDataGetData(pPkCol, rows), pPkCol->info.bytes); + memcpy(&cur.pks[0].val, colDataGetData(pPkCol, curIndex), pPkCol->info.bytes); } } From 2d0cf587dfcdce5cfe616f9dd9b3dd2cb7ecccae Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Sun, 12 May 2024 21:09:26 +0800 Subject: [PATCH 10/17] fix: change to TDengine Cloud --- tools/shell/src/shellAuto.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/shell/src/shellAuto.c b/tools/shell/src/shellAuto.c index 299bc6c72a..2c92d19fcf 100644 --- a/tools/shell/src/shellAuto.c +++ b/tools/shell/src/shellAuto.c @@ -429,7 +429,7 @@ void printfIntroduction(bool community) { printf(" * ------------------------------------------------------------------------------------ *\n"); printf(" * You are using TDengine OSS. To experience advanced features, like backup/restore, *\n"); printf(" * privilege control and more, or receive 7x24 technical support, try TDengine *\n"); - printf(" * Enterprise or Free Cloud Trial. Learn more at https://tdengine.com *\n"); + printf(" * Enterprise or TDengine Cloud. Learn more at https://tdengine.com *\n"); } printf(" ****************************************************************************************\n\n"); } @@ -438,7 +438,7 @@ void printfIntroduction(bool community) { void showAD(bool end) { printf(" You are using TDengine OSS. To experience advanced features, like backup/restore, \n"); printf(" privilege control and more, or receive 7x24 technical support, try TDengine Enterprise \n"); - printf(" or Free Cloud Trial. Learn more at https://tdengine.com \n"); + printf(" or TDengine Cloud. Learn more at https://tdengine.com \n"); printf(" \n"); } From bce036fe91b378c1f5448d04c81861dfb4eb79d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chappyguoxy=E2=80=9D?= <“happy_guoxy@163.com”> Date: Mon, 13 May 2024 10:31:33 +0800 Subject: [PATCH 11/17] add pk cases --- tests/parallel_test/cases.task | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/parallel_test/cases.task b/tests/parallel_test/cases.task index 3f8e3abac7..e3e1291c47 100644 --- a/tests/parallel_test/cases.task +++ b/tests/parallel_test/cases.task @@ -509,6 +509,11 @@ ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_4.py -Q 2 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_4.py -Q 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_4.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_5.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_5.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_5.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_5.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/primary_ts_base_5.py -Q 4 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/leastsquares.py ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/leastsquares.py -R ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/length.py From 3930cef9ac1c63c279ed1ba068afecf10cbc60f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chappyguoxy=E2=80=9D?= <“happy_guoxy@163.com”> Date: Mon, 13 May 2024 10:32:01 +0800 Subject: [PATCH 12/17] add pk cases --- .../system-test/2-query/primary_ts_base_5.py | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 tests/system-test/2-query/primary_ts_base_5.py diff --git a/tests/system-test/2-query/primary_ts_base_5.py b/tests/system-test/2-query/primary_ts_base_5.py new file mode 100644 index 0000000000..9246385157 --- /dev/null +++ b/tests/system-test/2-query/primary_ts_base_5.py @@ -0,0 +1,52 @@ +################################################################### +# Copyright (c) 2016 by TAOS Technologies, Inc. +# All rights reserved. +# +# This file is proprietary and confidential to TAOS Technologies. +# No part of this file may be reproduced, stored, transmitted, +# disclosed or used in any form or by any means other than as +# expressly provided by the written permission from Jianhui Tao +# +################################################################### + +# -*- coding: utf-8 -*- +from util.cases import tdCases +from .primary_ts_base import * +from faker import Faker +import random + +class TDTestCase(TDTestCase): + + def run(self): + startTime = time.time() + self.dropandcreateDB_primary_key(self.database, 1 , 1 ,'yes','yes','no') + + # self.fun_pk_interp(self.database,'interp','') + # self.multiple_agg_groupby(self.database,1) + # self.fun_pk_diff(self.database,'diff','') + # self.fun_pk_twa(self.database,'derivative',',1s,0') + # self.fun_pk_twa(self.database,'derivative',',1s,1') + # self.fun_pk_unique(self.database,'unique','') + # self.fun_pk_last_init(self.database,'last','') + # self.fun_pk_last(self.database,'last','') + # self.fun_pk_last(self.database,'last_row','') + # self.fun_pk_first(self.database,'first','') + + # self.query_pk_fun(self.database,'') + + # self.touying_pk_1(self.database,1) + # self.touying_pk_where(self.database,'') + self.touying_pk_where(self.database,'tags') + # self.touying_pk_where(self.database,'distinct') + self.count_pk(self.database,1) + + endTime = time.time() + print("total time %ds" % (endTime - startTime)) + + def stop(self): + tdSql.close() + tdLog.success("%s successfully executed" % __file__) + + +tdCases.addWindows(__file__, TDTestCase()) +tdCases.addLinux(__file__, TDTestCase()) From 8fcf35783ac7989482baf47763d8bc52ba31d503 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chappyguoxy=E2=80=9D?= <“happy_guoxy@163.com”> Date: Mon, 13 May 2024 10:32:05 +0800 Subject: [PATCH 13/17] add pk cases --- tests/system-test/2-query/primary_ts_base_4.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/system-test/2-query/primary_ts_base_4.py b/tests/system-test/2-query/primary_ts_base_4.py index 85e825df96..7e446ff442 100644 --- a/tests/system-test/2-query/primary_ts_base_4.py +++ b/tests/system-test/2-query/primary_ts_base_4.py @@ -36,9 +36,9 @@ class TDTestCase(TDTestCase): # self.touying_pk_1(self.database,1) # self.touying_pk_where(self.database,'') - self.touying_pk_where(self.database,'tags') + # self.touying_pk_where(self.database,'tags') self.touying_pk_where(self.database,'distinct') - self.count_pk(self.database,1) + # self.count_pk(self.database,1) endTime = time.time() print("total time %ds" % (endTime - startTime)) From ddb694a57edd6784e9903329bdbf1ef81a0f2154 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chappyguoxy=E2=80=9D?= <“happy_guoxy@163.com”> Date: Mon, 13 May 2024 11:51:12 +0800 Subject: [PATCH 14/17] add pk cases --- tests/system-test/2-query/primary_ts_base_1.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/system-test/2-query/primary_ts_base_1.py b/tests/system-test/2-query/primary_ts_base_1.py index 05e42155cf..739afcb1ab 100644 --- a/tests/system-test/2-query/primary_ts_base_1.py +++ b/tests/system-test/2-query/primary_ts_base_1.py @@ -27,8 +27,8 @@ class TDTestCase(TDTestCase): self.fun_pk_twa(self.database,'derivative',',1s,0') self.fun_pk_twa(self.database,'derivative',',1s,1') self.fun_pk_unique(self.database,'unique','') - # self.fun_pk_last_init(self.database,'last','') - # self.fun_pk_last(self.database,'last','') + self.fun_pk_last_init(self.database,'last','') + self.fun_pk_last(self.database,'last','') # self.fun_pk_last(self.database,'last_row','') # self.fun_pk_first(self.database,'first','') From 82b60a0bbf433eb299aabb122aff0825d2fedceb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chappyguoxy=E2=80=9D?= <“happy_guoxy@163.com”> Date: Mon, 13 May 2024 11:51:16 +0800 Subject: [PATCH 15/17] add pk cases --- tests/system-test/2-query/primary_ts_base_2.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/system-test/2-query/primary_ts_base_2.py b/tests/system-test/2-query/primary_ts_base_2.py index e12166bf1f..7aed595c60 100644 --- a/tests/system-test/2-query/primary_ts_base_2.py +++ b/tests/system-test/2-query/primary_ts_base_2.py @@ -27,14 +27,14 @@ class TDTestCase(TDTestCase): # self.fun_pk_twa(self.database,'derivative',',1s,0') # self.fun_pk_twa(self.database,'derivative',',1s,1') # self.fun_pk_unique(self.database,'unique','') - self.fun_pk_last_init(self.database,'last','') - self.fun_pk_last(self.database,'last','') + # self.fun_pk_last_init(self.database,'last','') + # self.fun_pk_last(self.database,'last','') self.fun_pk_last(self.database,'last_row','') self.fun_pk_first(self.database,'first','') self.query_pk_fun(self.database,'') - # self.touying_pk_1(self.database,1) + self.touying_pk_1(self.database,1) # self.touying_pk_where(self.database,'') # self.touying_pk_where(self.database,'tags') # self.touying_pk_where(self.database,'distinct') From 7d4ebd88e763e998e72cb429b39a2de885e6fa4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chappyguoxy=E2=80=9D?= <“happy_guoxy@163.com”> Date: Mon, 13 May 2024 11:51:19 +0800 Subject: [PATCH 16/17] add pk cases --- tests/system-test/2-query/primary_ts_base_3.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/system-test/2-query/primary_ts_base_3.py b/tests/system-test/2-query/primary_ts_base_3.py index a20d24378e..eb94deb719 100644 --- a/tests/system-test/2-query/primary_ts_base_3.py +++ b/tests/system-test/2-query/primary_ts_base_3.py @@ -34,7 +34,7 @@ class TDTestCase(TDTestCase): # self.query_pk_fun(self.database,'') - self.touying_pk_1(self.database,1) + # self.touying_pk_1(self.database,1) self.touying_pk_where(self.database,'') # self.touying_pk_where(self.database,'tags') # self.touying_pk_where(self.database,'distinct') From 850875a2c15992ea57e16995fd2652371307a8bd Mon Sep 17 00:00:00 2001 From: danielclow <106956386+danielclow@users.noreply.github.com> Date: Mon, 13 May 2024 14:24:25 +0800 Subject: [PATCH 17/17] docs: fix anchors for 3.0 branch --- docs/en/01-index.md | 2 +- docs/en/07-develop/01-connect/index.md | 2 +- docs/en/07-develop/02-model/index.mdx | 2 +- .../07-develop/03-insert-data/30-influxdb-line.mdx | 2 +- docs/en/08-client-libraries/03-cpp.mdx | 4 ++-- docs/en/08-client-libraries/04-java.mdx | 4 ++-- docs/en/08-client-libraries/05-go.mdx | 6 +++--- docs/en/08-client-libraries/06-rust.mdx | 12 ++++-------- docs/en/08-client-libraries/07-python.mdx | 2 +- docs/en/08-client-libraries/08-node.mdx | 2 +- docs/en/08-client-libraries/80-php.mdx | 2 +- docs/en/14-reference/05-taosbenchmark.md | 2 +- docs/en/14-reference/14-taosKeeper.md | 4 ++-- docs/en/20-third-party/03-telegraf.md | 2 +- 14 files changed, 22 insertions(+), 26 deletions(-) diff --git a/docs/en/01-index.md b/docs/en/01-index.md index 54271659ec..b5b01745da 100644 --- a/docs/en/01-index.md +++ b/docs/en/01-index.md @@ -13,7 +13,7 @@ TDengine greatly improves the efficiency of data ingestion, querying, and storag If you are a developer, please read the [Developer Guide](./develop) carefully. This section introduces the database connection, data modeling, data ingestion, query, continuous query, cache, data subscription, user-defined functions, and other functionality in detail. Sample code is provided for a variety of programming languages. In most cases, you can just copy and paste the sample code, and make a few changes to accommodate your application, and it will work. -We live in the era of big data, and scale-up is unable to meet the growing needs of the business. Any modern data system must have the ability to scale out, and clustering has become an indispensable feature of big data systems. Not only did the TDengine team develop the cluster feature, but also decided to open source this important feature. To learn how to deploy, manage and maintain a TDengine cluster please refer to [Cluster Deployment](../deployment). +We live in the era of big data, and scale-up is unable to meet the growing needs of the business. Any modern data system must have the ability to scale out, and clustering has become an indispensable feature of big data systems. Not only did the TDengine team develop the cluster feature, but also decided to open source this important feature. To learn how to deploy, manage and maintain a TDengine cluster please refer to [Cluster Deployment](./deployment). TDengine uses ubiquitous SQL as its query language, which greatly reduces learning costs and migration costs. In addition to the standard SQL, TDengine has extensions to better support time series data analysis. These extensions include functions such as roll-up, interpolation, and time-weighted average, among many others. The [SQL Reference](./taos-sql) chapter describes the SQL syntax in detail and lists the various supported commands and functions. diff --git a/docs/en/07-develop/01-connect/index.md b/docs/en/07-develop/01-connect/index.md index 2f826920ad..f84a65d326 100644 --- a/docs/en/07-develop/01-connect/index.md +++ b/docs/en/07-develop/01-connect/index.md @@ -36,7 +36,7 @@ For REST and native connections, client libraries provide similar APIs for perfo Key differences: 3. The REST connection is more accessible with cross-platform support, however it results in a 30% performance downgrade. -1. The TDengine client driver (taosc) has the highest performance with all the features of TDengine like [Parameter Binding](../../client-libraries/cpp#parameter-binding-api), [Subscription](../../client-libraries/cpp#subscription-and-consumption-api), etc. +1. The TDengine client driver (taosc) has the highest performance with all the features of TDengine like [Parameter Binding](../../client-libraries/cpp#parameter-binding-api), [Subscription](../../client-libraries/cpp#subscription-api), etc. ## Install Client Driver taosc diff --git a/docs/en/07-develop/02-model/index.mdx b/docs/en/07-develop/02-model/index.mdx index a18e1932ab..6df4d6a0e7 100644 --- a/docs/en/07-develop/02-model/index.mdx +++ b/docs/en/07-develop/02-model/index.mdx @@ -41,7 +41,7 @@ Without the current database specified, table name must be preceded with the cor ## Create STable -In a time-series application, there may be multiple kinds of data collection points. For example, in the electrical power system there are meters, transformers, bus bars, switches, etc. For easy and efficient aggregation of multiple tables, one STable needs to be created for each kind of data collection point. For example, for the meters in [table 1](../../concept/#model_table1), the SQL statement below can be used to create the super table. +In a time-series application, there may be multiple kinds of data collection points. For example, in the electrical power system there are meters, transformers, bus bars, switches, etc. For easy and efficient aggregation of multiple tables, one STable needs to be created for each kind of data collection point. For example, for the meters in [table 1](../../concept/), the SQL statement below can be used to create the super table. ```sql CREATE STABLE meters (ts timestamp, current float, voltage int, phase float) TAGS (location binary(64), groupId int); diff --git a/docs/en/07-develop/03-insert-data/30-influxdb-line.mdx b/docs/en/07-develop/03-insert-data/30-influxdb-line.mdx index b90b92510a..ddcaad8914 100644 --- a/docs/en/07-develop/03-insert-data/30-influxdb-line.mdx +++ b/docs/en/07-develop/03-insert-data/30-influxdb-line.mdx @@ -46,7 +46,7 @@ meters,location=California.LosAngeles,groupid=2 current=13.4,voltage=223,phase=0 ::: -For more details please refer to [InfluxDB Line Protocol](https://docs.influxdata.com/influxdb/v2.0/reference/syntax/line-protocol/) and [TDengine Schemaless](../../../reference/schemaless/#Schemaless-Line-Protocol) +For more details please refer to [InfluxDB Line Protocol](https://docs.influxdata.com/influxdb/v2.0/reference/syntax/line-protocol/) and [TDengine Schemaless](../../../reference/schemaless/) ## Examples diff --git a/docs/en/08-client-libraries/03-cpp.mdx b/docs/en/08-client-libraries/03-cpp.mdx index 59c5af9c03..dda436f553 100644 --- a/docs/en/08-client-libraries/03-cpp.mdx +++ b/docs/en/08-client-libraries/03-cpp.mdx @@ -32,7 +32,7 @@ The version number of the TDengine client driver and the version number of the T ## Installation Steps -Please refer to the [Installation Steps](../#installation-steps) for TDengine client driver installation +Please refer to [Install Client Driver](../#install-client-driver) for TDengine client driver installation ## Establishing a connection @@ -372,7 +372,7 @@ The specific functions related to the interface are as follows (see also the [pr Execute the prepared statement. Currently, a statement can only be executed once. - `int taos_stmt_affected_rows(TAOS_STMT *stmt)` - + Gets the number of rows affected by executing bind statements multiple times. - `int taos_stmt_affected_rows_once(TAOS_STMT *stmt)` diff --git a/docs/en/08-client-libraries/04-java.mdx b/docs/en/08-client-libraries/04-java.mdx index 9feab378e0..8af4e86899 100644 --- a/docs/en/08-client-libraries/04-java.mdx +++ b/docs/en/08-client-libraries/04-java.mdx @@ -160,7 +160,7 @@ For Java connector, the jts library can be used to easily create GEOMETRY type o Before using Java client library to connect to the database, the following conditions are required. - Java 1.8 or above runtime environment and Maven 3.6 or above installed -- TDengine client driver installed (required for native connections, not required for REST connections), please refer to [Installing Client Driver](../#Install-Client-Driver) +- TDengine client driver installed (required for native connections, not required for REST connections), please refer to [Install Client Driver](../#install-client-driver) ### Install the client library @@ -368,7 +368,7 @@ The configuration parameters in properties are as follows. - TSDBDriver.PROPERTY_KEY_MESSAGE_WAIT_TIMEOUT: message transmission timeout in milliseconds, the default value is 60000 ms. It only takes effect when using JDBC REST connection and batchfetch is true. - TSDBDriver.PROPERTY_KEY_USE_SSL: connecting Securely Using SSL. true: using SSL connection, false: not using SSL connection. It only takes effect when using JDBC REST connection. - TSDBDriver.HTTP_POOL_SIZE: size of REST concurrent requests. The default value is 20. - For JDBC native connections, you can specify other parameters, such as log level, SQL length, etc., by specifying URL and Properties. For more detailed configuration, please refer to [Client Configuration](../../reference/config/#Client-Only). + For JDBC native connections, you can specify other parameters, such as log level, SQL length, etc., by specifying URL and Properties. For more detailed configuration, please refer to [Client Configuration](../../reference/config/#configuration-file-on-client-side). ### Priority of configuration parameters diff --git a/docs/en/08-client-libraries/05-go.mdx b/docs/en/08-client-libraries/05-go.mdx index 11930e2429..528a21707e 100644 --- a/docs/en/08-client-libraries/05-go.mdx +++ b/docs/en/08-client-libraries/05-go.mdx @@ -129,7 +129,7 @@ username:password@protocol(address)/dbname?param=value _taosSql_ implements Go's `database/sql/driver` interface via cgo. You can use the [`database/sql`](https://golang.org/pkg/database/sql/) interface by simply introducing the driver. -Use `taosSql` as `driverName` and use a correct [DSN](#DSN) as `dataSourceName`, DSN supports the following parameters. +Use `taosSql` as `driverName` and use a correct DSN as `dataSourceName`, DSN supports the following parameters. * cfg specifies the `taos.cfg` directory @@ -160,7 +160,7 @@ func main() { _taosRestful_ implements Go's `database/sql/driver` interface via `http client`. You can use the [`database/sql`](https://golang.org/pkg/database/sql/) interface by simply introducing the driver. -Use `taosRestful` as `driverName` and use a correct [DSN](#DSN) as `dataSourceName` with the following parameters supported by the DSN. +Use `taosRestful` as `driverName` and use a correct DSN as `dataSourceName` with the following parameters supported by the DSN. * `disableCompression` whether to accept compressed data, default is true do not accept compressed data, set to false if transferring data using gzip compression. * `readBufferSize` The default size of the buffer for reading data is 4K (4096), which can be adjusted upwards when the query result has a lot of data. @@ -191,7 +191,7 @@ func main() { _taosRestful_ implements Go's `database/sql/driver` interface via `http client`. You can use the [`database/sql`](https://golang.org/pkg/database/sql/) interface by simply introducing the driver (driver-go minimum version 3.0.2). -Use `taosWS` as `driverName` and use a correct [DSN](#DSN) as `dataSourceName` with the following parameters supported by the DSN. +Use `taosWS` as `driverName` and use a correct DSN as `dataSourceName` with the following parameters supported by the DSN. * `writeTimeout` The timeout to send data via WebSocket. * `readTimeout` The timeout to receive response data via WebSocket. diff --git a/docs/en/08-client-libraries/06-rust.mdx b/docs/en/08-client-libraries/06-rust.mdx index ff4c1bf92b..cb27a2529d 100644 --- a/docs/en/08-client-libraries/06-rust.mdx +++ b/docs/en/08-client-libraries/06-rust.mdx @@ -321,7 +321,7 @@ let rs = taos.query_with_req_id("select * from stable where tag1 is null", 1)?; TDengine has significantly improved the bind APIs to support data writing (INSERT) scenarios. Writing data in this way avoids the resource consumption of SQL syntax parsing, resulting in significant write performance improvements in many cases. -Parameter binding details see [API Reference](#stmt-api) +Parameter binding details see [API Reference](#bind-interface) @@ -447,7 +447,7 @@ The following parameters can be configured for the TMQ DSN. Only `group.id` is m - `auto.commit.interval.ms`: Interval for automatic commits. #### Full Sample Code - + For more information, see [GitHub sample file](https://github.com/taosdata/TDengine/blob/3.0/docs/examples/rust/nativeexample/examples/subscribe_demo.rs). ### Use with connection pool @@ -559,7 +559,7 @@ The [Taos][struct.Taos] object provides an API to perform operations on multiple // binary/varchar to String location: String, } - + let records: Vec = taos .query("select * from `meters`") .await? @@ -578,11 +578,7 @@ Note that Rust asynchronous functions and an asynchronous runtime are required. In addition, this structure is also the entry point for Parameter Binding and Line Protocol Interface. Please refer to the specific API descriptions for usage. -

- -Bind Interface - -

+### Bind Interface Similar to the C interface, Rust provides the bind interface's wrapping. First, the [Taos][struct.taos] object creates a parameter binding object [Stmt] for an SQL statement. diff --git a/docs/en/08-client-libraries/07-python.mdx b/docs/en/08-client-libraries/07-python.mdx index 3110afcf10..220d676c2b 100644 --- a/docs/en/08-client-libraries/07-python.mdx +++ b/docs/en/08-client-libraries/07-python.mdx @@ -95,7 +95,7 @@ TDengine currently supports timestamp, number, character, Boolean type, and the 1. Install Python. The recent taospy package requires Python 3.6.2+. The earlier versions of taospy require Python 3.7+. The taos-ws-py package requires Python 3.7+. If Python is not available on your system, refer to the [Python BeginnersGuide](https://wiki.python.org/moin/BeginnersGuide/Download) to install it. 2. Install [pip](https://pypi.org/project/pip/). In most cases, the Python installer comes with the pip utility. If not, please refer to [pip documentation](https://pip.pypa.io/en/stable/installation/) to install it. -If you use a native connection, you will also need to [Install Client Driver](../#Install-Client-Driver). The client install package includes the TDengine client dynamic link library (`libtaos.so` or `taos.dll`) and the TDengine CLI. +If you use a native connection, you will also need to [Install Client Driver](../#install-client-driver). The client install package includes the TDengine client dynamic link library (`libtaos.so` or `taos.dll`) and the TDengine CLI. ### Install via pip diff --git a/docs/en/08-client-libraries/08-node.mdx b/docs/en/08-client-libraries/08-node.mdx index 71f360c6d1..5c8e9d87af 100644 --- a/docs/en/08-client-libraries/08-node.mdx +++ b/docs/en/08-client-libraries/08-node.mdx @@ -58,7 +58,7 @@ Please refer to [version support list](../#version-support) ### Pre-installation preparation - Install the Node.js development environment -- If you are using the REST client library, skip this step. However, if you use the native client library, please install the TDengine client driver. Please refer to [Install Client Driver](../#Install-Client-Driver) for more details. We use [node-gyp](https://github.com/nodejs/node-gyp) to interact with TDengine instances and also need to install some dependencies mentioned below depending on the specific OS. +- If you are using the REST client library, skip this step. However, if you use the native client library, please install the TDengine client driver. Please refer to [Install Client Driver](../#install-client-driver) for more details. We use [node-gyp](https://github.com/nodejs/node-gyp) to interact with TDengine instances and also need to install some dependencies mentioned below depending on the specific OS. diff --git a/docs/en/08-client-libraries/80-php.mdx b/docs/en/08-client-libraries/80-php.mdx index a83391c19c..b31a1d256e 100644 --- a/docs/en/08-client-libraries/80-php.mdx +++ b/docs/en/08-client-libraries/80-php.mdx @@ -40,7 +40,7 @@ Because the version of TDengine client driver is tightly associated with that of ### Install TDengine Client Driver -Regarding how to install TDengine client driver please refer to [Install Client Driver](../#installation-steps) +Regarding how to install TDengine client driver please refer to [Install Client Driver](../#install-client-driver) ### Install php-tdengine diff --git a/docs/en/14-reference/05-taosbenchmark.md b/docs/en/14-reference/05-taosbenchmark.md index 2f953b1f8c..e4884b889c 100644 --- a/docs/en/14-reference/05-taosbenchmark.md +++ b/docs/en/14-reference/05-taosbenchmark.md @@ -92,7 +92,7 @@ taosBenchmark -f -## Command-line argument in detail +## Command-line arguments in detail - **-f/--file <json file>** : specify the configuration file to use. This file includes All parameters. Users should not use this parameter with other parameters on the command-line. There is no default value. diff --git a/docs/en/14-reference/14-taosKeeper.md b/docs/en/14-reference/14-taosKeeper.md index a289ecf35f..f8148af869 100644 --- a/docs/en/14-reference/14-taosKeeper.md +++ b/docs/en/14-reference/14-taosKeeper.md @@ -23,7 +23,7 @@ Methods of installing taosKeeper: ### Configuration -taosKeeper needs to be executed on the terminal of the operating system, it supports three configuration methods: [Command-line arguments](#command-line-arguments-in-detail), [environment variable](#environment-variable-in-detail) and [configuration file](#configuration-file-parameters-in-detail). The precedence of those is Command-line, environment variable and configuration file. +taosKeeper needs to be executed on the terminal of the operating system, it supports three configuration methods: Command-line arguments, environment variable and configuration file. The precedence of those is Command-line, environment variable and configuration file. **Make sure that the TDengine cluster is running correctly before running taosKeeper.** Ensure that the monitoring service in TDengine has been started. At least the values of `monitor` and `monitorFqdn` need to be set in `taos.cfg`. @@ -32,7 +32,7 @@ monitor 1 monitorFqdn localhost # taoskeeper's FQDN ``` -For more information, see [TDengine Monitoring Configuration](../config/#monitoring). +For more information, see [TDengine Monitoring Configuration](../config/#monitoring-parameters). ### Quick Launch diff --git a/docs/en/20-third-party/03-telegraf.md b/docs/en/20-third-party/03-telegraf.md index 900262f51f..93586c701c 100644 --- a/docs/en/20-third-party/03-telegraf.md +++ b/docs/en/20-third-party/03-telegraf.md @@ -73,6 +73,6 @@ Query OK, 3 row(s) in set (0.013269s) - TDengine take influxdb format data and create unique ID for table names by the rule. The user can configure `smlChildTableName` parameter to generate specified table names if he/she needs. And he/she also need to insert data with specified data format. -For example, Add `smlChildTableName=tname` in the taos.cfg file. Insert data `st,tname=cpu1,t1=4 c1=3 1626006833639000000` then the table name will be cpu1. If there are multiple lines has same tname but different tag_set, the first line's tag_set will be used to automatically creating table and ignore other lines. Please refer to [TDengine Schemaless](../../reference/schemaless/#Schemaless-Line-Protocol) +For example, Add `smlChildTableName=tname` in the taos.cfg file. Insert data `st,tname=cpu1,t1=4 c1=3 1626006833639000000` then the table name will be cpu1. If there are multiple lines has same tname but different tag_set, the first line's tag_set will be used to automatically creating table and ignore other lines. Please refer to [TDengine Schemaless](../../reference/schemaless/) :::