From b52fb1b516fbca52df5d7d226ddff5eb53d36e2f Mon Sep 17 00:00:00 2001 From: afwerar <1296468573@qq.com> Date: Fri, 12 Aug 2022 20:36:53 +0800 Subject: [PATCH 01/15] build: release ver-3.0.0.0 --- packaging/tools/tdengine.iss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/tools/tdengine.iss b/packaging/tools/tdengine.iss index 7310201815..272a0dfb5c 100644 --- a/packaging/tools/tdengine.iss +++ b/packaging/tools/tdengine.iss @@ -51,7 +51,7 @@ Source: taos.bat; DestDir: "{app}\include"; Flags: igNoreversion; ;Source: taosdemo.png; DestDir: "{app}\include"; Flags: igNoreversion; ;Source: taosShell.png; DestDir: "{app}\include"; Flags: igNoreversion; Source: favicon.ico; DestDir: "{app}\include"; Flags: igNoreversion; -Source: {#MyAppSourceDir}{#MyAppDLLName}; DestDir: "{win}\System32"; Flags: igNoreversion; +Source: {#MyAppSourceDir}{#MyAppDLLName}; DestDir: "{win}\System32"; Flags: 64bit;Check:IsWin64; Source: {#MyAppSourceDir}{#MyAppCfgName}; DestDir: "{app}\cfg"; Flags: igNoreversion recursesubdirs createallsubdirs onlyifdoesntexist uninsneveruninstall Source: {#MyAppSourceDir}{#MyAppDriverName}; DestDir: "{app}\driver"; Flags: igNoreversion recursesubdirs createallsubdirs ;Source: {#MyAppSourceDir}{#MyAppConnectorName}; DestDir: "{app}\connector"; Flags: igNoreversion recursesubdirs createallsubdirs From b72b8e62b783e285d2a3a7f3708905a71b3cd4dc Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Fri, 12 Aug 2022 23:13:23 +0800 Subject: [PATCH 02/15] doc: update taos.cfg --- packaging/cfg/taos.cfg | 271 ++++++++++------------------------------- 1 file changed, 64 insertions(+), 207 deletions(-) diff --git a/packaging/cfg/taos.cfg b/packaging/cfg/taos.cfg index 7d77a0b23e..f76241c51f 100644 --- a/packaging/cfg/taos.cfg +++ b/packaging/cfg/taos.cfg @@ -5,137 +5,54 @@ # # ######################################################## -# first fully qualified domain name (FQDN) for TDengine system +# The end point of the first dnode in the cluster to be connected to when `taosd` or `taos` is started # firstEp hostname:6030 -# local fully qualified domain name (FQDN) +# The end point of the second dnode to be connected to if the firstEp is not available when `taosd` or `taos` is started +# secondEp + +# The FQDN of the host where `taosd` will be started. It can be IP address # fqdn hostname -# first port number for the connection (12 continuous UDP/TCP port number are used) +# The port for external access after `taosd` is started # serverPort 6030 -# log file's directory +# The maximum number of connections a dnode can accept +# maxShellConns 5000 + +# The directory for writing log files # logDir /var/log/taos -# data file's directory +# All data files are stored in this director # dataDir /var/lib/taos # temporary file's directory # tempDir /tmp/ -# the arbitrator's fully qualified domain name (FQDN) for TDengine system, for cluster only -# arbitrator arbitrator_hostname:6042 - -# number of threads per CPU core -# numOfThreadsPerCore 1.0 - -# number of threads to commit cache data -# numOfCommitThreads 4 - -# the proportion of total CPU cores available for query processing -# 2.0: the query threads will be set to double of the CPU cores. -# 1.0: all CPU cores are available for query processing [default]. -# 0.5: only half of the CPU cores are available for query. -# 0.0: only one core available. -# ratioOfQueryCores 1.0 - -# the last_row/first/last aggregator will not change the original column name in the result fields -keepColumnName 1 - -# number of management nodes in the system -# numOfMnodes 1 - -# enable/disable backuping vnode directory when removing vnode -# vnodeBak 1 - -# enable/disable installation / usage report +# Switch for allowing TDengine to collect and report service usage information # telemetryReporting 1 -# enable/disable load balancing -# balance 1 +# The maximum number of vnodes supported by dnode +# supportVnodes 0 -# role for dnode. 0 - any, 1 - mnode, 2 - dnode -# role 0 - -# max timer control blocks -# maxTmrCtrl 512 - -# time interval of system monitor, seconds -# monitorInterval 30 - -# number of seconds allowed for a dnode to be offline, for cluster only -# offlineThreshold 864000 - -# RPC re-try timer, millisecond -# rpcTimer 300 - -# RPC maximum time for ack, seconds. -# rpcMaxTime 600 - -# time interval of dnode status reporting to mnode, seconds, for cluster only +# The interval of dnode reporting status to mnode # statusInterval 1 -# time interval of heart beat from shell to dnode, seconds +# The interval for taos shell to send heartbeat to mnode # shellActivityTimer 3 -# minimum sliding window time, milli-second +# The minimum sliding window time, milli-second # minSlidingTime 10 -# minimum time window, milli-second +# The minimum time window, milli-second # minIntervalTime 10 -# maximum delay before launching a stream computation, milli-second -# maxStreamCompDelay 20000 +# The maximum allowed query buffer size in MB during query processing for each data node +# -1 no limit (default) +# 0 no query allowed, queries are disabled +# queryBufferSize -1 -# maximum delay before launching a stream computation for the first time, milli-second -# maxFirstStreamCompDelay 10000 - -# retry delay when a stream computation fails, milli-second -# retryStreamCompDelay 10 - -# the delayed time for launching a stream computation, from 0.1(default, 10% of whole computing time window) to 0.9 -# streamCompDelayRatio 0.1 - -# max number of vgroups per db, 0 means configured automatically -# maxVgroupsPerDb 0 - -# max number of tables per vnode -# maxTablesPerVnode 1000000 - -# cache block size (Mbyte) -# cache 16 - -# number of cache blocks per vnode -# blocks 6 - -# number of days per DB file -# days 10 - -# number of days to keep DB file -# keep 3650 - -# minimum rows of records in file block -# minRows 100 - -# maximum rows of records in file block -# maxRows 4096 - -# the number of acknowledgments required for successful data writing -# quorum 1 - -# enable/disable compression -# comp 2 - -# write ahead log (WAL) level, 0: no wal; 1: write wal, but no fysnc; 2: write wal, and call fsync -# walLevel 1 - -# if walLevel is set to 2, the cycle of fsync being executed, if set to 0, fsync is called right away -# fsync 3000 - -# number of replications, for cluster only -# replica 1 - -# the compressed rpc message, option: +# The compressed rpc message, option: # -1 (no compression) # 0 (all message compressed), # > 0 (rpc message body which larger than this value will be compressed) @@ -147,15 +64,6 @@ keepColumnName 1 # > 0 (any retrieved column size greater than this value all data will be compressed.) # compressColData -1 -# max length of an SQL -# maxSQLLength 65480 - -# max length of WildCards -# maxWildCardsLength 100 - -# the maximum number of records allowed for super table time sorting -# maxNumOfOrderedRes 100000 - # system time zone # timezone Asia/Shanghai (CST, +0800) # system time zone (for windows 10) @@ -167,12 +75,6 @@ keepColumnName 1 # default system charset # charset UTF-8 -# max number of connections allowed in dnode -# maxShellConns 5000 - -# max number of connections allowed in client -# maxConnections 5000 - # stop writing logs when the disk size of the log folder is less than this value # minimalLogDirGB 1.0 @@ -182,30 +84,9 @@ keepColumnName 1 # if disk free space is less than this value, taosd service exit directly within startup process # minimalDataDirGB 2.0 -# One mnode is equal to the number of vnode consumed -# mnodeEqualVnodeNum 4 - -# enbale/disable http service -# http 1 - # enable/disable system monitor # monitor 1 -# enable/disable recording the SQL statements via restful interface -# httpEnableRecordSql 0 - -# number of threads used to process http requests -# httpMaxThreads 2 - -# maximum number of rows returned by the restful interface -# restfulRowLimit 10240 - -# database name must be specified in restful interface if the following parameter is set, off by default -# httpDbNameMandatory 1 - -# http keep alive, default is 30 seconds -# httpKeepAlive 30000 - # The following parameter is used to limit the maximum number of lines in log files. # max number of lines per log filters # numOfLogLines 10000000 @@ -216,7 +97,6 @@ keepColumnName 1 # time of keeping log files, days # logKeepDays 0 - # The following parameters are used for debug purpose only. # debugFlag 8 bits mask: FILE-SCREEN-UNUSED-HeartBeat-DUMP-TRACE_WARN-ERROR # 131: output warning and error @@ -228,85 +108,62 @@ keepColumnName 1 # debug flag for all log type, take effect when non-zero value # debugFlag 0 -# debug flag for meta management messages -# mDebugFlag 135 - -# debug flag for dnode messages -# dDebugFlag 135 - -# debug flag for sync module -# sDebugFlag 135 - -# debug flag for WAL -# wDebugFlag 135 - -# debug flag for SDB -# sdbDebugFlag 135 - -# debug flag for RPC -# rpcDebugFlag 131 - -# debug flag for TAOS TIMER +# debug flag for timer # tmrDebugFlag 131 -# debug flag for TDengine client -# cDebugFlag 131 - -# debug flag for JNI -# jniDebugFlag 131 - -# debug flag for storage +# debug flag for util # uDebugFlag 131 -# debug flag for http server -# httpDebugFlag 131 +# debug flag for rpc +# rpcDebugFlag 131 -# debug flag for monitor -# monDebugFlag 131 +# debug flag for jni +# jniDebugFlag 131 # debug flag for query # qDebugFlag 131 +# debug flag for taosc driver +# cDebugFlag 131 + +# debug flag for dnode messages +# dDebugFlag 135 + # debug flag for vnode # vDebugFlag 131 -# debug flag for TSDB +# debug flag for meta management messages +# mDebugFlag 135 + +# debug flag for wal +# wDebugFlag 135 + +# debug flag for sync module +# sDebugFlag 135 + +# debug flag for tsdb # tsdbDebugFlag 131 -# debug flag for continue query -# cqDebugFlag 131 +# debug flag for tq +# tqDebugFlag 131 -# enable/disable recording the SQL in taos client -# enableRecordSql 0 +# debug flag for fs +# fsDebugFlag 131 + +# debug flag for udf +# udfDebugFlag 131 + +# debug flag for sma +# smaDebugFlag 131 + +# debug flag for index +# idxDebugFlag 131 + +# debug flag for tdb +# tdbDebugFlag 131 + +# debug flag for meta +# metaDebugFlag 131 # generate core file when service crash # enableCoreFile 1 - -# maximum display width of binary and nchar fields in the shell. The parts exceeding this limit will be hidden -# maxBinaryDisplayWidth 30 - -# enable/disable stream (continuous query) -# stream 1 - -# in retrieve blocking model, only in 50% query threads will be used in query processing in dnode -# retrieveBlockingModel 0 - -# the maximum allowed query buffer size in MB during query processing for each data node -# -1 no limit (default) -# 0 no query allowed, queries are disabled -# queryBufferSize -1 - -# percent of redundant data in tsdb meta will compact meta data,0 means donot compact -# tsdbMetaCompactRatio 0 - -# default string type used for storing JSON String, options can be binary/nchar, default is nchar -# defaultJSONStrType nchar - -# force TCP transmission -# rpcForceTcp 0 - -# unit MB. Flush vnode wal file if walSize > walFlushSize and walSize > cache*0.5*blocks -# walFlushSize 1024 - -# unit Hour. Latency of data migration -# keepTimeOffset 0 From 13930f89e9e4c8d38fc785acdc9a5396bb78e2d2 Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Fri, 12 Aug 2022 23:17:39 +0800 Subject: [PATCH 03/15] doc: update taos.cfg --- packaging/cfg/taos.cfg | 70 +++++++++++++++++++++--------------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/packaging/cfg/taos.cfg b/packaging/cfg/taos.cfg index f76241c51f..aae2e7c856 100644 --- a/packaging/cfg/taos.cfg +++ b/packaging/cfg/taos.cfg @@ -23,7 +23,7 @@ # The directory for writing log files # logDir /var/log/taos -# All data files are stored in this director +# All data files are stored in this directory # dataDir /var/lib/taos # temporary file's directory @@ -50,52 +50,52 @@ # The maximum allowed query buffer size in MB during query processing for each data node # -1 no limit (default) # 0 no query allowed, queries are disabled -# queryBufferSize -1 +# queryBufferSize -1 # The compressed rpc message, option: # -1 (no compression) # 0 (all message compressed), # > 0 (rpc message body which larger than this value will be compressed) -# compressMsgSize -1 +# compressMsgSize -1 # query retrieved column data compression option: # -1 (no compression) # 0 (all retrieved column data compressed), # > 0 (any retrieved column size greater than this value all data will be compressed.) -# compressColData -1 +# compressColData -1 # system time zone # timezone Asia/Shanghai (CST, +0800) # system time zone (for windows 10) -# timezone UTC-8 +# timezone UTC-8 # system locale -# locale en_US.UTF-8 +# locale en_US.UTF-8 # default system charset -# charset UTF-8 +# charset UTF-8 # stop writing logs when the disk size of the log folder is less than this value -# minimalLogDirGB 1.0 +# minimalLogDirGB 1.0 # stop writing temporary files when the disk size of the tmp folder is less than this value -# minimalTmpDirGB 1.0 +# minimalTmpDirGB 1.0 # if disk free space is less than this value, taosd service exit directly within startup process -# minimalDataDirGB 2.0 +# minimalDataDirGB 2.0 # enable/disable system monitor -# monitor 1 +# monitor 1 # The following parameter is used to limit the maximum number of lines in log files. # max number of lines per log filters -# numOfLogLines 10000000 +# numOfLogLines 10000000 # enable/disable async log -# asyncLog 1 +# asyncLog 1 # time of keeping log files, days -# logKeepDays 0 +# logKeepDays 0 # The following parameters are used for debug purpose only. # debugFlag 8 bits mask: FILE-SCREEN-UNUSED-HeartBeat-DUMP-TRACE_WARN-ERROR @@ -106,64 +106,64 @@ # 207: output trace, debug, warning and error to both screen and file # debug flag for all log type, take effect when non-zero value -# debugFlag 0 +# debugFlag 0 # debug flag for timer -# tmrDebugFlag 131 +# tmrDebugFlag 131 # debug flag for util -# uDebugFlag 131 +# uDebugFlag 131 # debug flag for rpc -# rpcDebugFlag 131 +# rpcDebugFlag 131 # debug flag for jni -# jniDebugFlag 131 +# jniDebugFlag 131 # debug flag for query -# qDebugFlag 131 +# qDebugFlag 131 # debug flag for taosc driver -# cDebugFlag 131 +# cDebugFlag 131 # debug flag for dnode messages -# dDebugFlag 135 +# dDebugFlag 135 # debug flag for vnode -# vDebugFlag 131 +# vDebugFlag 131 # debug flag for meta management messages -# mDebugFlag 135 +# mDebugFlag 135 # debug flag for wal -# wDebugFlag 135 +# wDebugFlag 135 # debug flag for sync module -# sDebugFlag 135 +# sDebugFlag 135 # debug flag for tsdb -# tsdbDebugFlag 131 +# tsdbDebugFlag 131 # debug flag for tq -# tqDebugFlag 131 +# tqDebugFlag 131 # debug flag for fs -# fsDebugFlag 131 +# fsDebugFlag 131 # debug flag for udf -# udfDebugFlag 131 +# udfDebugFlag 131 # debug flag for sma -# smaDebugFlag 131 +# smaDebugFlag 131 # debug flag for index -# idxDebugFlag 131 +# idxDebugFlag 131 # debug flag for tdb -# tdbDebugFlag 131 +# tdbDebugFlag 131 # debug flag for meta -# metaDebugFlag 131 +# metaDebugFlag 131 # generate core file when service crash -# enableCoreFile 1 +# enableCoreFile 1 From 43cce75bbde9bc7d018e82928457dfb11613a97e Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Fri, 12 Aug 2022 23:23:04 +0800 Subject: [PATCH 04/15] feat: update taostoosl d237772 for 3.0 rel (#16079) --- cmake/taostools_CMakeLists.txt.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/taostools_CMakeLists.txt.in b/cmake/taostools_CMakeLists.txt.in index 3a6eb3c25a..1751549680 100644 --- a/cmake/taostools_CMakeLists.txt.in +++ b/cmake/taostools_CMakeLists.txt.in @@ -2,7 +2,7 @@ # taos-tools ExternalProject_Add(taos-tools GIT_REPOSITORY https://github.com/taosdata/taos-tools.git - GIT_TAG 53a0103 + GIT_TAG d237772 SOURCE_DIR "${TD_SOURCE_DIR}/tools/taos-tools" BINARY_DIR "" #BUILD_IN_SOURCE TRUE From f9eee95f7314f547ac6962c85ed081f327b6a101 Mon Sep 17 00:00:00 2001 From: afwerar <1296468573@qq.com> Date: Fri, 12 Aug 2022 23:49:33 +0800 Subject: [PATCH 05/15] build: release ver-3.0.0.0 --- packaging/deb/DEBIAN/prerm | 1 + packaging/deb/makedeb.sh | 1 + packaging/rpm/tdengine.spec | 2 ++ packaging/tools/post.sh | 2 ++ 4 files changed, 6 insertions(+) diff --git a/packaging/deb/DEBIAN/prerm b/packaging/deb/DEBIAN/prerm index 5676bf5c43..4953102842 100644 --- a/packaging/deb/DEBIAN/prerm +++ b/packaging/deb/DEBIAN/prerm @@ -29,6 +29,7 @@ else # Remove all links ${csudo}rm -f ${bin_link_dir}/taos || : ${csudo}rm -f ${bin_link_dir}/taosd || : + ${csudo}rm -f ${bin_link_dir}/udfd || : ${csudo}rm -f ${bin_link_dir}/taosadapter || : ${csudo}rm -f ${bin_link_dir}/taosdemo || : ${csudo}rm -f ${cfg_link_dir}/* || : diff --git a/packaging/deb/makedeb.sh b/packaging/deb/makedeb.sh index 6de475a4c0..3db9005f95 100755 --- a/packaging/deb/makedeb.sh +++ b/packaging/deb/makedeb.sh @@ -60,6 +60,7 @@ cp ${compile_dir}/../packaging/tools/set_core.sh ${pkg_dir}${install_home_pat cp ${compile_dir}/../packaging/tools/taosd-dump-cfg.gdb ${pkg_dir}${install_home_path}/bin cp ${compile_dir}/build/bin/taosd ${pkg_dir}${install_home_path}/bin +cp ${compile_dir}/build/bin/udfd ${pkg_dir}${install_home_path}/bin cp ${compile_dir}/build/bin/taosBenchmark ${pkg_dir}${install_home_path}/bin if [ -f "${compile_dir}/build/bin/taosadapter" ]; then diff --git a/packaging/rpm/tdengine.spec b/packaging/rpm/tdengine.spec index 7a34f7a222..637d2d425a 100644 --- a/packaging/rpm/tdengine.spec +++ b/packaging/rpm/tdengine.spec @@ -69,6 +69,7 @@ cp %{_compiledir}/../packaging/tools/set_core.sh %{buildroot}%{homepath}/bin cp %{_compiledir}/../packaging/tools/taosd-dump-cfg.gdb %{buildroot}%{homepath}/bin cp %{_compiledir}/build/bin/taos %{buildroot}%{homepath}/bin cp %{_compiledir}/build/bin/taosd %{buildroot}%{homepath}/bin +cp %{_compiledir}/build/bin/udfd %{buildroot}%{homepath}/bin cp %{_compiledir}/build/bin/taosBenchmark %{buildroot}%{homepath}/bin if [ -f %{_compiledir}/build/bin/taosadapter ]; then @@ -204,6 +205,7 @@ if [ $1 -eq 0 ];then # Remove all links ${csudo}rm -f ${bin_link_dir}/taos || : ${csudo}rm -f ${bin_link_dir}/taosd || : + ${csudo}rm -f ${bin_link_dir}/udfd || : ${csudo}rm -f ${bin_link_dir}/taosadapter || : ${csudo}rm -f ${cfg_link_dir}/* || : ${csudo}rm -f ${inc_link_dir}/taos.h || : diff --git a/packaging/tools/post.sh b/packaging/tools/post.sh index aa80cfb86c..fcc8a2a942 100755 --- a/packaging/tools/post.sh +++ b/packaging/tools/post.sh @@ -118,6 +118,7 @@ function install_bin() { # Remove links ${csudo}rm -f ${bin_link_dir}/taos || : ${csudo}rm -f ${bin_link_dir}/taosd || : + ${csudo}rm -f ${bin_link_dir}/udfd || : ${csudo}rm -f ${bin_link_dir}/taosadapter || : ${csudo}rm -f ${bin_link_dir}/taosBenchmark || : ${csudo}rm -f ${bin_link_dir}/taosdemo || : @@ -130,6 +131,7 @@ function install_bin() { #Make link [ -x ${bin_dir}/taos ] && ${csudo}ln -s ${bin_dir}/taos ${bin_link_dir}/taos || : [ -x ${bin_dir}/taosd ] && ${csudo}ln -s ${bin_dir}/taosd ${bin_link_dir}/taosd || : + [ -x ${bin_dir}/udfd ] && ${csudo}ln -s ${bin_dir}/udfd ${bin_link_dir}/udfd || : [ -x ${bin_dir}/taosadapter ] && ${csudo}ln -s ${bin_dir}/taosadapter ${bin_link_dir}/taosadapter || : [ -x ${bin_dir}/taosBenchmark ] && ${csudo}ln -sf ${bin_dir}/taosBenchmark ${bin_link_dir}/taosdemo || : [ -x ${bin_dir}/taosBenchmark ] && ${csudo}ln -sf ${bin_dir}/taosBenchmark ${bin_link_dir}/taosBenchmark || : From 8e3aa6e687043fb32a119fd50c1c6d2a0c88981f Mon Sep 17 00:00:00 2001 From: afwerar <1296468573@qq.com> Date: Sat, 13 Aug 2022 00:03:42 +0800 Subject: [PATCH 06/15] build: release ver-3.0.0.0 --- packaging/tools/makepkg.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/tools/makepkg.sh b/packaging/tools/makepkg.sh index 6103ce170c..8f81bd5cf6 100755 --- a/packaging/tools/makepkg.sh +++ b/packaging/tools/makepkg.sh @@ -318,7 +318,7 @@ if [ "$verMode" == "cluster" ]; then fi # Copy release note -cp ${script_dir}/release_note ${install_dir} +# cp ${script_dir}/release_note ${install_dir} # exit 1 From 39c93de6c94cd3eacdd937fea4ca18562be07618 Mon Sep 17 00:00:00 2001 From: afwerar <1296468573@qq.com> Date: Sat, 13 Aug 2022 00:30:43 +0800 Subject: [PATCH 07/15] build: release ver-3.0.0.0 --- packaging/tools/install.sh | 5 ++++- packaging/tools/makepkg.sh | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packaging/tools/install.sh b/packaging/tools/install.sh index eda2b052d1..39606ead30 100755 --- a/packaging/tools/install.sh +++ b/packaging/tools/install.sh @@ -18,6 +18,7 @@ script_dir=$(dirname $(readlink -f "$0")) clientName="taos" serverName="taosd" +udfdName="udfd" configFile="taos.cfg" productName="TDengine" emailName="taosdata.com" @@ -192,6 +193,7 @@ function install_bin() { # Remove links ${csudo}rm -f ${bin_link_dir}/${clientName} || : ${csudo}rm -f ${bin_link_dir}/${serverName} || : + ${csudo}rm -f ${bin_link_dir}/${udfdName} || : ${csudo}rm -f ${bin_link_dir}/${adapterName} || : ${csudo}rm -f ${bin_link_dir}/${uninstallScript} || : ${csudo}rm -f ${bin_link_dir}/${demoName} || : @@ -205,6 +207,7 @@ function install_bin() { #Make link [ -x ${install_main_dir}/bin/${clientName} ] && ${csudo}ln -s ${install_main_dir}/bin/${clientName} ${bin_link_dir}/${clientName} || : [ -x ${install_main_dir}/bin/${serverName} ] && ${csudo}ln -s ${install_main_dir}/bin/${serverName} ${bin_link_dir}/${serverName} || : + [ -x ${install_main_dir}/bin/${udfdName} ] && ${csudo}ln -s ${install_main_dir}/bin/${udfdName} ${bin_link_dir}/${udfdName} || : [ -x ${install_main_dir}/bin/${adapterName} ] && ${csudo}ln -s ${install_main_dir}/bin/${adapterName} ${bin_link_dir}/${adapterName} || : [ -x ${install_main_dir}/bin/${benchmarkName} ] && ${csudo}ln -s ${install_main_dir}/bin/${benchmarkName} ${bin_link_dir}/${demoName} || : [ -x ${install_main_dir}/bin/${benchmarkName} ] && ${csudo}ln -s ${install_main_dir}/bin/${benchmarkName} ${bin_link_dir}/${benchmarkName} || : @@ -742,7 +745,7 @@ function is_version_compatible() { fi exist_version=$(${installDir}/bin/${serverName} -V | head -1 | cut -d ' ' -f 3) - vercomp $exist_version "2.0.16.0" + vercomp $exist_version "3.0.0.0" case $? in 2) prompt_force=1 diff --git a/packaging/tools/makepkg.sh b/packaging/tools/makepkg.sh index 8f81bd5cf6..f5e3bf1882 100755 --- a/packaging/tools/makepkg.sh +++ b/packaging/tools/makepkg.sh @@ -85,6 +85,7 @@ else ${build_dir}/bin/${clientName} \ ${taostools_bin_files} \ ${build_dir}/bin/taosadapter \ + ${build_dir}/bin/udfd \ ${script_dir}/remove.sh \ ${script_dir}/set_core.sh \ ${script_dir}/startPre.sh \ From 45cc2a67ae27b97fac56def87dac1e5265de8132 Mon Sep 17 00:00:00 2001 From: afwerar <1296468573@qq.com> Date: Mon, 15 Aug 2022 16:37:40 +0800 Subject: [PATCH 08/15] os: fix win lack dll error --- cmake/cmake.define | 8 +++++++- contrib/CMakeLists.txt | 2 +- source/os/src/osRand.c | 8 ++++++-- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/cmake/cmake.define b/cmake/cmake.define index 5639d212d7..989b69a89b 100644 --- a/cmake/cmake.define +++ b/cmake/cmake.define @@ -81,7 +81,7 @@ ENDIF () IF (TD_WINDOWS) MESSAGE("${Yellow} set compiler flag for Windows! ${ColourReset}") - SET(COMMON_FLAGS "/w /D_WIN32 /DWIN32 /Zi") + SET(COMMON_FLAGS "/w /D_WIN32 /DWIN32 /Zi /MTd") SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MANIFEST:NO") # IF (MSVC AND (MSVC_VERSION GREATER_EQUAL 1900)) # SET(COMMON_FLAGS "${COMMON_FLAGS} /Wv:18") @@ -92,6 +92,12 @@ IF (TD_WINDOWS) IF (CMAKE_DEPFILE_FLAGS_CXX) SET(CMAKE_DEPFILE_FLAGS_CXX "") ENDIF () + IF (CMAKE_C_FLAGS_DEBUG) + SET(CMAKE_C_FLAGS_DEBUG "" CACHE STRING "" FORCE) + ENDIF () + IF (CMAKE_CXX_FLAGS_DEBUG) + SET(CMAKE_CXX_FLAGS_DEBUG "" CACHE STRING "" FORCE) + ENDIF () SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COMMON_FLAGS}") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMMON_FLAGS}") diff --git a/contrib/CMakeLists.txt b/contrib/CMakeLists.txt index b4e8825431..294b59fe95 100644 --- a/contrib/CMakeLists.txt +++ b/contrib/CMakeLists.txt @@ -273,7 +273,7 @@ endif(${BUILD_WITH_NURAFT}) # pthread if(${BUILD_PTHREAD}) - set(CMAKE_BUILD_TYPE release) + set(CMAKE_BUILD_TYPE debug) add_definitions(-DPTW32_STATIC_LIB) add_subdirectory(pthread EXCLUDE_FROM_ALL) set_target_properties(libpthreadVC3 PROPERTIES OUTPUT_NAME pthread) diff --git a/source/os/src/osRand.c b/source/os/src/osRand.c index 461a72e962..bd2bfa486e 100644 --- a/source/os/src/osRand.c +++ b/source/os/src/osRand.c @@ -37,9 +37,13 @@ uint32_t taosRandR(uint32_t *pSeed) { uint32_t taosSafeRand(void) { #ifdef WINDOWS - uint32_t seed; + uint32_t seed = taosRand(); HCRYPTPROV hCryptProv; - if (!CryptAcquireContext(&hCryptProv, NULL, NULL, PROV_RSA_FULL, 0)) return seed; + if (!CryptAcquireContext(&hCryptProv, NULL, NULL, PROV_RSA_FULL, 0)) { + if (!CryptAcquireContext(&hCryptProv, NULL, NULL, PROV_RSA_FULL, CRYPT_NEWKEYSET)) { + return seed; + } + } if (hCryptProv != NULL) { if (!CryptGenRandom(hCryptProv, 4, &seed)) return seed; } From 3829a1c42c7885bbf00e99434d9ee628433e430b Mon Sep 17 00:00:00 2001 From: afwerar <1296468573@qq.com> Date: Tue, 16 Aug 2022 16:19:28 +0800 Subject: [PATCH 09/15] feat: remove storage from community --- source/common/CMakeLists.txt | 5 ++++ source/common/src/tglobal.c | 55 ++---------------------------------- 2 files changed, 8 insertions(+), 52 deletions(-) diff --git a/source/common/CMakeLists.txt b/source/common/CMakeLists.txt index 1c11ee7085..9c6d941172 100644 --- a/source/common/CMakeLists.txt +++ b/source/common/CMakeLists.txt @@ -9,6 +9,11 @@ IF (TD_GRANT) ADD_DEFINITIONS(-D_GRANT) ENDIF () +IF (TD_STORAGE) + ADD_DEFINITIONS(-D_STORAGE) + TARGET_LINK_LIBRARIES(common PRIVATE storage) +ENDIF () + target_include_directories( common PUBLIC "${TD_SOURCE_DIR}/include/common" diff --git a/source/common/src/tglobal.c b/source/common/src/tglobal.c index 8823e63db4..59f7ec02f7 100644 --- a/source/common/src/tglobal.c +++ b/source/common/src/tglobal.c @@ -165,58 +165,9 @@ int32_t tsTtlUnit = 86400; int32_t tsTtlPushInterval = 86400; int32_t tsGrantHBInterval = 60; -void taosAddDataDir(int32_t index, char *v1, int32_t level, int32_t primary) { - tstrncpy(tsDiskCfg[index].dir, v1, TSDB_FILENAME_LEN); - tsDiskCfg[index].level = level; - tsDiskCfg[index].primary = primary; - uTrace("dataDir:%s, level:%d primary:%d is configured", v1, level, primary); -} - -static int32_t taosSetTfsCfg(SConfig *pCfg) { - SConfigItem *pItem = cfgGetItem(pCfg, "dataDir"); - memset(tsDataDir, 0, PATH_MAX); - - int32_t size = taosArrayGetSize(pItem->array); - if (size <= 0) { - tsDiskCfgNum = 1; - taosAddDataDir(0, pItem->str, 0, 1); - tstrncpy(tsDataDir, pItem->str, PATH_MAX); - if (taosMulMkDir(tsDataDir) != 0) { - uError("failed to create dataDir:%s since %s", tsDataDir, terrstr()); - return -1; - } - } else { - tsDiskCfgNum = size < TFS_MAX_DISKS ? size : TFS_MAX_DISKS; - for (int32_t index = 0; index < tsDiskCfgNum; ++index) { - SDiskCfg *pCfg = taosArrayGet(pItem->array, index); - memcpy(&tsDiskCfg[index], pCfg, sizeof(SDiskCfg)); - if (pCfg->level == 0 && pCfg->primary == 1) { - tstrncpy(tsDataDir, pCfg->dir, PATH_MAX); - } - if (taosMulMkDir(pCfg->dir) != 0) { - uError("failed to create tfsDir:%s since %s", tsDataDir, terrstr()); - return -1; - } - } - } - - if (tsDataDir[0] == 0) { - if (pItem->str != NULL) { - taosAddDataDir(tsDiskCfgNum, pItem->str, 0, 1); - tstrncpy(tsDataDir, pItem->str, PATH_MAX); - if (taosMulMkDir(tsDataDir) != 0) { - uError("failed to create tfsDir:%s since %s", tsDataDir, terrstr()); - return -1; - } - tsDiskCfgNum++; - } else { - uError("datadir not set"); - return -1; - } - } - - return 0; -} +#ifndef _STORAGE +int32_t taosSetTfsCfg(SConfig *pCfg) { return 0; } +#endif struct SConfig *taosGetCfg() { return tsCfg; From a89f945e4fdebe2f90822208a88ba7db42b2a409 Mon Sep 17 00:00:00 2001 From: Shuaiqiang Chang Date: Tue, 16 Aug 2022 16:45:56 +0800 Subject: [PATCH 10/15] Update 07-tmq.mdx --- docs/zh/07-develop/07-tmq.mdx | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/docs/zh/07-develop/07-tmq.mdx b/docs/zh/07-develop/07-tmq.mdx index f22c3419cc..58d2f109ee 100644 --- a/docs/zh/07-develop/07-tmq.mdx +++ b/docs/zh/07-develop/07-tmq.mdx @@ -107,6 +107,7 @@ class TaosConsumer(): def close(self) def __del__(self) + ``` @@ -126,6 +127,7 @@ func (c *Consumer) Subscribe(topics []string) error func (c *Consumer) Unsubscribe() error ``` + @@ -152,6 +154,7 @@ void Commit(ConsumeResult consumerResult) void Close() ``` + @@ -393,6 +396,7 @@ var cfg = new ConsumerConfig var consumer = new ConsumerBuilder(cfg).Build(); ``` + @@ -441,7 +445,6 @@ if err != nil { - ```C# @@ -454,15 +457,12 @@ consumer.Subscribe(topics); - ```python consumer = TaosConsumer('topic_ctb_column', group_id='vg2') ``` - - ## 消费 @@ -504,7 +504,6 @@ for msg in consumer: ``` - ```go @@ -537,7 +536,6 @@ while (true) - ## 结束消费 消费结束后,应当取消订阅。 @@ -966,5 +964,3 @@ for msg in consumer: - - From 51fdbe430edf0c424247f9eb3b0bbe9ab618411d Mon Sep 17 00:00:00 2001 From: Shuaiqiang Chang Date: Tue, 16 Aug 2022 16:49:57 +0800 Subject: [PATCH 11/15] Update 07-tmq.mdx --- docs/zh/07-develop/07-tmq.mdx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/zh/07-develop/07-tmq.mdx b/docs/zh/07-develop/07-tmq.mdx index 58d2f109ee..6ab08b97d2 100644 --- a/docs/zh/07-develop/07-tmq.mdx +++ b/docs/zh/07-develop/07-tmq.mdx @@ -90,6 +90,7 @@ void close() throws SQLException; + ```python class TaosConsumer(): def __init__(self, *topics, **configs) @@ -107,9 +108,10 @@ class TaosConsumer(): def close(self) def __del__(self) - ``` + + ```go @@ -152,7 +154,6 @@ void Unsubscribe() void Commit(ConsumeResult consumerResult) void Close() - ``` @@ -590,6 +591,7 @@ consumer.Unsubscribe(); // 关闭消费 consumer.Close(); +``` From 13ed3771dc4a1d08b79df8b4fbfe4c5be0c6c0fd Mon Sep 17 00:00:00 2001 From: Shuaiqiang Chang Date: Tue, 16 Aug 2022 16:55:23 +0800 Subject: [PATCH 12/15] Update 03-package.md --- docs/zh/05-get-started/03-package.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/zh/05-get-started/03-package.md b/docs/zh/05-get-started/03-package.md index 7e694a704f..b7b9d41d2d 100644 --- a/docs/zh/05-get-started/03-package.md +++ b/docs/zh/05-get-started/03-package.md @@ -11,10 +11,6 @@ import PkgListV3 from "/components/PkgListV3"; ## 安装 -:::info -下载其他组件、最新 Beta 版及之前版本的安装包,请点击[发布历史页面](../../releases) -::: - @@ -100,6 +96,10 @@ apt-get 方式只适用于 Debian 或 Ubuntu 系统 +:::info +下载其他组件、最新 Beta 版及之前版本的安装包,请点击[发布历史页面](../../releases) +::: + :::note 当安装第一个节点时,出现 Enter FQDN:提示的时候,不需要输入任何内容。只有当安装第二个或以后更多的节点时,才需要输入已有集群中任何一个可用节点的 FQDN,支持该新节点加入集群。当然也可以不输入,而是在新节点启动前,配置到新节点的配置文件中。 From 43f25518241ab1c8ccf449788d87855db4b3c7ba Mon Sep 17 00:00:00 2001 From: xleili Date: Tue, 16 Aug 2022 17:23:25 +0800 Subject: [PATCH 13/15] docs(driver):update nodejs tmq doc --- docs/zh/07-develop/07-tmq.mdx | 88 +++++++++++++++++++++++++++++++++-- 1 file changed, 83 insertions(+), 5 deletions(-) diff --git a/docs/zh/07-develop/07-tmq.mdx b/docs/zh/07-develop/07-tmq.mdx index 6ab08b97d2..c9ac178081 100644 --- a/docs/zh/07-develop/07-tmq.mdx +++ b/docs/zh/07-develop/07-tmq.mdx @@ -134,7 +134,7 @@ func (c *Consumer) Unsubscribe() error -```C# +```csharp ConsumerBuilder(IEnumerable> config) virtual IConsumer Build() @@ -158,6 +158,26 @@ void Close() + + +```node +function TMQConsumer(config) + +function subscribe(topic) + +function consume(timeout) + +function subscription() + +function unsubscribe() + +function commit(msg) + +function close() +``` + + + ## 写入数据 @@ -376,7 +396,7 @@ if err != nil { -```C# +```csharp using TDengineTMQ; // 根据需要,设置消费组 (GourpId)、自动提交 (EnableAutoCommit)、 @@ -400,6 +420,28 @@ var consumer = new ConsumerBuilder(cfg).Build(); + + +``` node +// 根据需要,设置消费组 (group.id)、自动提交 (enable.auto.commit)、 +// 自动提交时间间隔 (auto.commit.interval.ms)、用户名 (td.connect.user)、密码 (td.connect.pass) 等参数 + +let consumer = taos.consumer({ + 'enable.auto.commit': 'true', + 'auto.commit.interval.ms','1000', + 'group.id': 'tg2', + 'td.connect.user': 'root', + 'td.connect.pass': 'taosdata', + 'auto.offset.reset','earliest', + 'msg.with.table.name': 'true', + 'td.connect.ip','127.0.0.1', + 'td.connect.port','6030' + }); + +``` + + + 上述配置中包括 consumer group ID,如果多个 consumer 指定的 consumer group ID 一样,则自动形成一个 consumer group,共享消费进度。 @@ -448,7 +490,7 @@ if err != nil { -```C# +```csharp // 创建订阅 topics 列表 List topics = new List(); topics.add("tmq_topic"); @@ -464,6 +506,18 @@ consumer = TaosConsumer('topic_ctb_column', group_id='vg2') ``` + + +```node +// 创建订阅 topics 列表 +let topics = ['topic_test'] + +// 启动订阅 +consumer.subscribe(topics); +``` + + + ## 消费 @@ -523,7 +577,7 @@ for { -```C# +```csharp // 消费数据 while (true) { @@ -535,6 +589,21 @@ while (true) ``` + + + +```node +while(true){ + msg = consumer.consume(200); + // process message(consumeResult) + console.log(msg.topicPartition); + console.log(msg.block); + console.log(msg.fields) + } +``` + + + ## 结束消费 @@ -585,7 +654,7 @@ consumer.Close() -```C# +```csharp // 取消订阅 consumer.Unsubscribe(); @@ -594,6 +663,15 @@ consumer.Close(); ``` + + +```node +consumer.unsubscribe(); +consumer.close(); +``` + + + ## 删除 *topic* From 091695c64166eba05bf982c0fc80c5e84a51ea22 Mon Sep 17 00:00:00 2001 From: xleili Date: Tue, 16 Aug 2022 17:29:59 +0800 Subject: [PATCH 14/15] docs(driver):update nodejs tmq doc --- docs/zh/07-develop/07-tmq.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/zh/07-develop/07-tmq.mdx b/docs/zh/07-develop/07-tmq.mdx index c9ac178081..3ce211c608 100644 --- a/docs/zh/07-develop/07-tmq.mdx +++ b/docs/zh/07-develop/07-tmq.mdx @@ -160,7 +160,7 @@ void Close() -```node +```javascript function TMQConsumer(config) function subscribe(topic) From 11d4313da59260301fe47e766953325a8e814b1b Mon Sep 17 00:00:00 2001 From: xleili Date: Tue, 16 Aug 2022 17:32:24 +0800 Subject: [PATCH 15/15] docs(driver):update nodejs tmq doc --- docs/zh/07-develop/07-tmq.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/zh/07-develop/07-tmq.mdx b/docs/zh/07-develop/07-tmq.mdx index 3ce211c608..c9ac178081 100644 --- a/docs/zh/07-develop/07-tmq.mdx +++ b/docs/zh/07-develop/07-tmq.mdx @@ -160,7 +160,7 @@ void Close() -```javascript +```node function TMQConsumer(config) function subscribe(topic)